Help with default layouts

Community Forums Forums Design Tips and Tricks Help with default layouts

This topic is: not resolved

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  andym193 2 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #111945

    andym193
    Member
    Post count: 19

    I have created all my themes on the Genesis framework, all my themes come with all 6 layouts. I would like to know if it is possible to set a default layout but still allowing users to change the layout?

    It seems a bit of an odd request but it’s only because I have a multisite and would prefer this setup if its possible.

    Iv’e seen these code snippets in the tutorials where you can set the default layout:

    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

    however this forces the website to always use the layout and so users are unable to change it.

    Any help appreciated

    • This topic was modified 3 months ago by  andym193.
    • This topic was modified 3 months ago by  andym193.
    #112107

    McGuive7
    Participant
    Post count: 37

    You’re right, the code you’re using is a way to FORCE a layout, often used for a specific page template or post type, etc.

    If you want to just modify the default layout, or any Genesis default for that matter, you’ll probably want to use the genesis_theme_settings_defaults filter. You can check out a good example from Bill Erickson here: http://www.billerickson.net/code/genesis-theme-settings/

    • This reply was modified 3 months ago by  McGuive7.
    • This reply was modified 3 months ago by  McGuive7.
    #112110

    Robert Neu
    Participant
    Post count: 90

    You can give this a try:

    https://gist.github.com/wpbacon/bb8cb89433582e23cb0b

    It’s untested, so I’m not 100% sure it will work, but it looks like it should.


    Co-Founder of Audit WP, a WordPress SEO audit service and Flagship, a new WordPress theme company launching soon!

    • This reply was modified 3 months ago by  Robert Neu.
    • This reply was modified 3 months ago by  Robert Neu.
    #113126

    andym193
    Member
    Post count: 19

    Thanks for your help.

    That worked.

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

You must be logged in to reply to this topic.