- This topic is empty.
-
AuthorPosts
-
March 10, 2017 at 9:19 am #252611vnvillarParticipant
Hey guys!
I am currently working on a custom WordPress theme right now and I wanted to achieve a dynamic post styling where you can select how the post should look like on the homepage.
See sample screenshot below of what I’m trying to achieve:
So in the WordPress admin’s Post editor, I can select how the post should look like.
See screenshot:
I’ve been trying to look if there’s any plugin to do it but I am not sure where to start and how to do it. Hope you can help me guys?
Looking forward to your response. Thanks in advance!
Best,
ValMarch 13, 2017 at 6:24 am #252719vnvillarParticipantHello guys,
Hope you can help me. Thanks! :)
Best,
ValMarch 13, 2017 at 7:43 am #252720MMPLParticipantMaybe this help you ;)
https://andornagy.com/custom-post-and-page-templates-in-wordpress/
March 13, 2017 at 7:53 am #252721Ilan FirsovParticipantOne option is to use a [post format](https://codex.wordpress.org/Post_Format) then based on that change the classes/template loaded.
Another would be something like [Advanced Custom Fields](http://www.advancedcustomfields.com/) and again, change classes/template.And if you just want to edit the single page style, you can use page templates mentioned above.
March 13, 2017 at 7:54 am #252722vnvillarParticipantHey @MMPL!
Thank you for response and for sharing the article. I will look into this and hopefully it’ll solve the problem.
I’m still open to receive more tutorials and code examples since I’m not that advance with coding stuff haha.
Thanks for the help! :)
Best,
ValMarch 13, 2017 at 8:00 am #252724vnvillarParticipantHi @ilanf
Thanks for your response. I’m looking into showing the different post layouts when its viewed on the Homepage only. Using Post Formats, would there be a custom field on my post editor where I can select what type if layout I should use for a post? Like screenshot below:
Thanks for the help!
March 13, 2017 at 11:40 pm #252743Ilan FirsovParticipantAfter you enable post format support in your theme (`add_theme_support( ‘post-formats’ )`) you will see [this](http://i.imgur.com/JDjROqM.png) in the edit post screen. Not exactly like in the screenshot but close enough I guess…
You can enable support for all formats or some of them, but unfortunately we can’t add custom post formats yet (maybe in the future?) -
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.