I have a blog where by default layout is content-sidebar. When visitors read single posts it is content-sidebar. Is there a way to default singe post pages to use full width content?
I’m aware that you can select full width when writing a post but I’d like to make it the default.
Hi braddalton. I believe that would change my default layout for the whole site. On my homepage I wanted to maintain the sidebar but when a visitor views a single blog post I wanted it to display full width.
I found that it could be done with a plugin called Genesis Layout Extras but wanted to know if it can be done without a plugin.
Correct and my bad so I wrote you this code and tested it for you also.
Code not displaying? Grab it on Github.
Please copy the code using the view raw link & paste it at the end of your child themes functions.php file using a text editor like Notepad++
That worked perfectly! Thank you!
I have Content/Sidebar as default sitewide, but I need the single post view to have the layout Sidebar(secondary)/Content/Sidebar(main).
Could you please provide the appropriate code for the single post?
Link to your site please.
You can only use the default layouts in Genesis otherwise you would need to create a new custom layout.
You can change the default layouts conditionally for all single posts using this code.
Thank you very much!
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.