I think I tried everything imaginable but I’m not able to set a custom template for the post page.
In the WordPress settings I chose static page and selected a “Posts page” as well. Now I want to create a template for this “posts page” but no matter what I do Cwicly uses always the Index template for this page. I have this issue only with the “posts page”.
What am I missing here?
Sorry you are experiencing this problem.
I just tried and found no issue on my side.
Here how I did it.
In the Dashboard, at the bottom left, click on the Cwicly menu.
You should arrive to the Cwicly Templates.
Here you can create a new Template by clicking on the Add Custom Template button.
A modal opens, asking you to give it a name, do so and click Create.
You should now see your new Template with the name you gave it, as the first item of the Templates page.
Click on the Visibility Conditions icon (an Eye) of this Template. A modal opens, click on the + Icon and set the visibility conditions as below:
Once done, close the modal and then click on the Edit Icon
(the pencil) of your new Template.
Here you should access to a new Template.
Add a Cwicly Section Block
, within add a CwiclyHeading Block
, and right after (still within the section) a Cwicly Post Content Block
Write something in the heading, so you can make sure where you are.
Things should look like this:
Save your changes twice, and open a page in your browser, then a post to see how both are rendered.
It works here and I hope it will work with you.
If you are looking to create a specific template for only one Page, then in the Template Conditions, change the last parameter, All for the Title of the page you would like to render.
thank you very much for your detailed response. I appreciate it!
I have successfully created many templates. For example for archives of custom post types – there is no problem.
Lets say you create a page named “blog”. Now you create a template the way you described above but only for this specific page (this works fine also for me). Now you go to the WordPress settings and specify the page “blog” as your “posts page”. As soon as you do that your template does not work anymore and Cwicly will use the index one. At least for me. I tried this on two installations.
Thanks again for your response!
Hi @Jonas you are loosing me there:
Now you go to the WordPress settings and specify the page “blog” as your “posts page”.
What is this WordPress setting you are referring to and why do you need it for?
You find this setting here:
In WordPress go to “Settings” then to “Reading” and then you select “A static page (select below)”. Isn’t this how that works? That was always the first thing I did with a fresh WordPress install.
So I select my “Static front page” and below I choose the page I want to use as my “posts page” so the page where all my posts will be – like an archive.
Ok, well this setting is for setting what will serve as the Homepage of your site, either a single page or an archive of posts.
Try instead to use the Cwicly Themer and create a Template with Conditions:
Show If - Singular - FrontPage
This Template should run as your homepage and not disrupt the rules of the other templates.
I hope this really help this time
Well for my front page template I selected this condition anyway – and it works great
But my guess was that it is probably better to also tell WordPress what page you want to use for your posts to appear because WordPress could use that information for some stuff behind the scenes (some linking, connecting or seo?^^) That’s why I always selected my home page and the posts page in these settings.
So you never touch this settings?
Well I used these settings before, but with Cwicly, I have been working with the Themer.
Thanks again for your help @JuGa !
Well I don’t think I gave you any answer,
I guess you would need @Louis to understand the priorities and if not using the WP settings has any downside…
Sorry to hear you’re having trouble with this.
Thanks @JuGa for your really helpful points here.
Unfortunately, it seems WordPress forces the Index - Home templates to be applied whenever you apply the
Posts Page setting for a specific page.
I’ll try and dig a bit deeper in the coming days, but I can’t promise anything as quite a few of the block based functions in Gutenberg are not filterable currently… Something I’m sure they’ll be improving.
Thanks for bringing this up!
@JuGa Well it works now and knowing that I probably don’t have to set the posts page is definitely helpful!
Also the effort counts!
Thanks @Louis ! But if there is no need to set the posts page there is no need for a hurry. So please don’t feel pressured to investigate.