Archived topic
Hide first post on blog home
3 replies · Started by Joey on August 19, 2022
I'm using a query loop for the featured post instead of the "Featured Post" option in the customizer. I set the query loop for "all posts" and selected to show only one post. However, it now repeats the first post 2 times. Is there a way to hide the first post of the blog home so that the first post isn't repeated?
The reason I'm doing this with query loop instead of featured post is 1) it's easier to customize, 2) I can easily make it responsive, and 3) it would just be less custom PHP and CSS on the site, since I only need it on the first page of the blog home. I've been searching the forums and documentation and can't find anything. Thank you.
Hi Joey,
In this case, using the Query loop block is not the best practice.
Instead, you can create a block element - content template only for the first post:
https://www.screencast.com/t/spF98M3lth
Then go to customizer > layout > blog, tick the Make first post featured box.
Let me know if this works :)
Oh, okay, I didn't know about content template. That's a better solution. I suppose a hook would be for other information added to the page. Thank you for your help.
Glad to help :)