Single Page Posts Default to One Column

Community Forums Forums General Discussion Single Page Posts Default to One Column

This topic is: resolved

Tagged: , ,

This topic contains 7 replies, has 3 voices, and was last updated by  smikraki 1 year, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #40036

    stratafive
    Participant
    Post count: 12

    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.


    #40045

    braddalton
    Participant
    Post count: 10217

    Yes there is.

    Go to Genesis > Theme Settings > Default Layout and select full width.


    #40062

    stratafive
    Participant
    Post count: 12

    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.


    #40067

    braddalton
    Participant
    Post count: 10217

    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++


    #40077

    stratafive
    Participant
    Post count: 12

    That worked perfectly! Thank you!


    #55980

    smikraki
    Participant
    Post count: 4

    Hi braddalton!
    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?

    #55983

    braddalton
    Participant
    Post count: 10217

    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.

    https://gist.github.com/braddalton/6219497


    #56081

    smikraki
    Participant
    Post count: 4

    Thank you very much!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.