Community Forums › Forums › Archived Forums › Design Tips and Tricks › Landing page template for post
Tagged: landing page, post template, single post
- This topic has 7 replies, 3 voices, and was last updated 6 years, 11 months ago by
Chuck.
-
AuthorPosts
-
February 3, 2019 at 5:54 pm #489268
rogerp
ParticipantI have a post that I would like to use the landing page template on, which I am not able to set as it looks like you can only do it on pages.
Is this true? Is there any way to apply the landing page template to a post
Using the Smart Passive Income Theme
Thanks
https://www.rogerperkin.co.uk/network-automation/ansible/network-automation-training/Roger
https://www.rogerperkin.co.uk/
Check out my Network Automation Training – Training the Network Engineers of the FutureFebruary 3, 2019 at 6:37 pm #489270Chuck
MemberYou should be able to setup template file for a post type. Here is a gist which may help:
Also look at the WordPress Template Heirarchy in the Codex.
Chuck Smith
Twitter: @polishedwpFebruary 3, 2019 at 10:33 pm #489275Brad Dalton
ParticipantAdd a template header like this example :
// Template Name: Any Post Type Template // Template Post Type: post, page, portfolio
February 4, 2019 at 2:57 am #489281rogerp
ParticipantThanks Brad,
Have added that file, and now get the post attributes / template option in my post, but not exactly clear on how you get to select landing page template?
As the options now are default template or any-post-type template
Roger
https://www.rogerperkin.co.uk/
Check out my Network Automation Training – Training the Network Engineers of the FutureFebruary 4, 2019 at 3:50 am #489283Brad Dalton
ParticipantJust add the template header to a copy of the landing page template.
February 5, 2019 at 2:58 pm #489315rogerp
ParticipantThanks Brad, it's working but I have a mucked up landing page template?
It is hard left instead of centered? It's same for pages or posts so must have some CSS error somewhere styling it like that.
https://www.rogerperkin.co.uk/uncategorized/sales-page-test/
Roger
https://www.rogerperkin.co.uk/
Check out my Network Automation Training – Training the Network Engineers of the FutureFebruary 6, 2019 at 5:00 am #489337rogerp
ParticipantAll seems to be looking good now, I had some CSS caching issues I think as looked on another machine and all is centred.
Question - how do I force users how have my css file cached to get new one?
Or is this out of my control and could be a long time?
Roger
https://www.rogerperkin.co.uk/
Check out my Network Automation Training – Training the Network Engineers of the FutureFebruary 6, 2019 at 5:11 am #489338Chuck
MemberThe easiest way is with theme versioning. There is a good lab at KnowtheCode which explains the process. The first video is free and gives you the basic idea.
Genesis Version – Ensure Your Latest Changes Go Out to the Browser
Chuck Smith
Chuck Smith
Twitter: @polishedwp -
AuthorPosts
- The topic ‘Landing page template for post’ is closed to new replies.