Archived topic
Custom template for archive posts
1 reply · Started by Erwin on March 10, 2023
Hello, is it possible to create a custom template for the 1st, 2nd and 3rd message in a header?
I have a block hook (generate_after_header) where I want to display the first 3 messages in a specific way.
I hope I explained my question clearly, if not let me know :)
Hi Erwin,
When you say the first 3 messages, are you referring to the first three posts of the archive?
If so, you can add 3 query loop blocks in the block element - hook.
For the 2nd query loop block, set the offset parameter to 1.
For the 3rd query loop block, set the offset parameter to 2.
For all the 3 query loop blocks, set the posts per page to 1.
Then you will need to add custom PHP code to offset 3 posts from the default original post loop.