How do I create 2 different layouts for posts in FSE?
-
(I don’t have any reason to believe that this problem is related to 2023 theme, but let me know if you think it is).
I was creating a new website using Full Site Editor (FSE) and the 2023 theme. I’m not a php or WP developer, but I have lots of experience managing several self-hosted wordpress sites and using FSE to create/customize templates and template parts.
My goal is to create two separate layouts for posts (not pages). For all posts I will be adding a Featured Image to show up in social media and in archive pages.
Layout 1 should have the Featured Image show up on top of the individual post.
Layout 2 should not have the Featured Image show up on top. It will only show up on the Archive page and on social media.
Doing that has proven to be fiendishly difficult when using only the FSE.
In the FSE template editor under Templates, I select ADD NEW TEMPLATE –> SINGLE ITEM POST –> ADD NEW TEMPLATE. I have a choice between ALL POSTS and POST FOR A SINGLE ITEM.
I don’t quite understand the exact meaning of both options, but when I’ve created new templates for SINGLE ITEM POST with either option, I can create the template and save it (naming it “CUSTOM-POST-WITH-FIMAGE”). I just can’t invoke the template when I create a new post.
In contrast, I know how to create PAGE templates and invoke them. For example, I have created a new PAGE template (named CUSTOM-PAGE). When I create a new PAGE, on the right menu you can click on TEMPLATE: Page link (and then select CUSTOM-PAGE template which is listed in the dropdown list of templates). So that leads me to believe that I would do something similar when I am creating a post using the CUSTOM-POST-WITH-FIMAGE template. The only problem is: CUSTOM-POST-WITH-FIMAGE never appears in the template dropdown list when I am editing a new post. I only see the regular templates and custom template pages I have created (like CUSTOM-PAGE).
From the right menu of the post edit screen I see that the default template type for new posts is TEMPLATE: SINGLE .
What am I missing here? Why doesn’t my CUSTOM-POST-WITH-FIMAGE post template ever appear in the template dropdown list when trying to create a new individual post? Is this a bug with my theme? Or is this expected behavior?
Finally, if this is expected behavior, what steps would be necessary to create an archive page listing both pages and posts mixed together? I see that in the QUERY LOOP block you can choose either POSTS or PAGES but not both. Is there an option to do this (or maybe a plugin)?
Thanks.
- The topic ‘How do I create 2 different layouts for posts in FSE?’ is closed to new replies.