- This topic has 7 replies, 3 voices, and was last updated 4 years, 6 months ago by Tom.
January 13, 2016 at 12:22 pm #165629Alessio Angeloro
i have created a template child with some customization, now i would to create a different post layout for some post, i’have tried with “content-single-%mypostid%.php” but not working; also is it possibile to make this change for the page layout ?
Thansk so much
RegardsJanuary 13, 2016 at 11:46 pm #165708TomLead DeveloperLead Developer
Hmm, did you find somewhere that told you to use this kind of file name?:
I can’t find any information on using custom page templates for posts.
What do you mean by making the change for the page layout?
Let me know 🙂January 14, 2016 at 1:01 am #165715Alessio Angeloro
yes but not with GP, let’s hope the logic it’s the same.
I need to load some script / php code only in some post or pages.
Please let me know.January 14, 2016 at 10:24 am #165795TomLead DeveloperLead Developer
The first point on that page says this:
Page templates only apply to pages, not to any other content type (like posts and custom post types).
You can load scripts/PHP code on some posts or pages by using if conditionals: https://codex.wordpress.org/Conditional_Tags
Specific pages: https://codex.wordpress.org/Conditional_Tags#A_PAGE_Page
Specific posts: https://codex.wordpress.org/Conditional_Tags#A_Single_Post_PageJanuary 15, 2017 at 2:09 pm #264384Jessica
I too would love to create different custom layouts for the different blog post formats. I’ve seen it before on other people’s site’s so I’m assuming there’s a way to do it.
Would I create a custom page called
I want to be able to have custom layouts for each of these format types.January 15, 2017 at 9:32 pm #264438TomLead DeveloperLead DeveloperJanuary 16, 2017 at 3:56 pm #264751Jessica
Thanks. Worked with a colleague and got it worked out.
Howevever, these are the only formats I see to choose from:
Your example (I found in another post) referenced additional types:
Is there a way to enable the last 3?
I’ve since created a custom workaround to have (essentially) custom post types for the blog posts and created custom page templates but wondered but those last 3 weren’t showing up in the format options.
Thanks!January 16, 2017 at 7:50 pm #264819TomLead DeveloperLead Developer
This might help: https://codex.wordpress.org/Post_Formats#Formats_in_a_Child_Theme
- You must be logged in to reply to this topic.