Archived topic
Customizing layout for archive pages with pages (not post)
31 replies · Started by marc on April 20, 2021
Hi guys,
I'm simply trying to get my archive pages to display the content in column. However, I use pages (not posts) with categories.
When I go to customize > layout > blog and select display in column for archive pages it does nothing. I tried every settings but it simply won't work, could you help?
Thanks in advance
Marc
Hi there,
you can enable columns for pages in the archive by adding the PHP Snippet that Tom provides here:
https://generatepress.com/forums/topic/archive-columns/#post-1654815
Hi David,
Thanks for your help, it worked :)
Now that I'm here, is there a quick way to display the post/page title as an overlay of the featured image (with a dark semi-transparent background) on the archive pages?
This topic here explains how to move the Title into the post thumbnail HTML and overlay the image:
https://generatepress.com/forums/topic/entry-title-over-post-image-for-archives/#post-1705340
Adding a background we could probably do with some CSS - if you want to try the above and let me know i can take a look at the overlay CSS
Thanks a lot David, all done and it works.
Could you let me know for the black CSS overlay?
Hi Marc,
Give this CSS a try:
.archive .generate-columns-container .inside-article .post-image:before {
content: "";
background-color: rgba(0, 0, 0, 0.25);
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
Thanks a lot Ying, it worked.
However, since I'm using Tom's plugin on my home page (WP show post) it shows a bunch of stacked title which I wasn't able to remove with the "layout element disable content title" applied on the home page.
Any idea how I can get rid of it?
Thanks,
Marc
Do you want to hide these titles?
Actually there's a setting in WP show posts, uncheck the include title box should work.
https://www.screencast.com/t/yLdFBGqK
Hi Ying,
Thanks for your reply. Yes I did try that but I still get a bunch of stacked title (I did clear my WP cache and else).
Anyway I can exclude those titles on the front page from the php snippet David referred me to?
Because the exclude layout element doesn't work on that home page :/
Thanks in advance
The PHP Snippets and the CSS i provided shouldn't affect the WP Show Posts plugin content as that uses different code.
When i checked your home page i am not seeing the WPSP content - where can i see the issue ?
Hi David,
Yes I find it weird but it definitly there.
I had to deactivate it because it's ugly, you can check it now it's on the home page.
Thanks again,
Marc
(right after the first H2)
Can you confirm how you want them styled ? Do you want them the same as the Archives?
On the home page I only want to remove those stacked title, nothing else. (so nope I don't want to style them the same as the archives).
Give this CSS a try:
.wp-show-posts-inner h2.entry-title {
display: none;
}