Primary Sidebar on One-page only

Community Forums Forums Design Tips and Tricks Primary Sidebar on One-page only

This topic is: not resolved

Tagged: ,

This topic contains 7 replies, has 5 voices, and was last updated by  braddalton 4 months, 2 weeks ago.

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

    mark_s
    Member
    Post count: 6

    Hi guys

    I have a design need I can’t find an elegant solution to.

    I’m using the Genesis Sample theme and want every single page to have full-width content, except one, which will have a primary sidebar. So we’re talking home, about, contact are all full-width, my blog page has a sidebar.

    I’ve tried Genesis Simple Sidebars etc. but can’t seem to be able to select anything but the default page setting in the New Page tab.

    Any ideas?

    #104412

    Susan
    Moderator
    Post count: 9014

    Set your default setting to be full width, and then on your blog page, set your layout to be content > sidebar.

    If you’re not seeing layout setting on the new page at all, select the “screen options” at the top of the page.

    If you are seeing layout settings, but it only gives you the option to choose full width layout, then make sure that the option for other layouts has not been disabled in your functions.php file. (The sample theme does not have it disabled…)


    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #104479

    mark_s
    Member
    Post count: 6

    Thanks Susan

    I have checked my functions.php files and it is not disabled.

    Different layouts in “Layout Settings” still un-selectable. It will only use default.

    Is there some code and a Custom Body Class I can use (I’ve seen something suggested around this, mostly to turn them off from being default)? Or can I somehow enable a Sidebar page under Page Attributes > Template dropdown?

    Many thanks
    Mark

    #104547

    emasai
    Participant
    Post count: 669

    Try this tut by Sridhar
    http://sridharkatakam.com/apply-layout-genesis-conditionally/


    Need Website Customization or a Responsive CSS fix? Contact Me
    Lynne emasai.com

    #104561

    essaysnark
    Participant
    Post count: 342

    This tutorial might also be helpful:

    http://dreamwhisperdesigns.com/genesis-tutorials/load-sidebar-specific-pages/

    It sounds like either your sidebar isn’t registered properly, and/or you haven’t placed anything in it in the Widgets area (some themes suppress the sidebar when it’s empty; not sure if the default Genesis theme does that or not).

    #104570

    mark_s
    Member
    Post count: 6

    Thanks guys. Forgive my inexperience, but if I wanted to add a sidebar to my blog page only, http://www.example.com/blog/ then I would add the following code to my theme functions.php file. Hesitant to change functions.php without asking the pros first!
    ————————-
    add_action( ‘genesis_meta’, ‘sk_force_layout’ );
    function sk_force_layout() {

    if ( is_singular(‘blog’ ) ) {
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_sidebar_content’ );
    }

    }

    #105243

    mark_s
    Member
    Post count: 6

    Please no-one use the code above I don’t think it’s correct. I was wondering if someone could look at this before I put it in my functions.php file to check it is correct?

    //* Force content-sidebar layout on blog page only
    
    add_filter( 'genesis_pre_get_option_site_layout', 'content_sidebar_layout_blog_page' );
    function content_sidebar_layout_blog_page( $opt ) {
    	if ( is_page( 'Blog' ) ) {
    		$opt = 'content-sidebar'; 
    		return $opt;
    	} 
    
    }

    Basically, I think this assigns a function to a new term ‘content_sidebar_layout_blog_page’ which makes the layout ‘content-sidebar’ to which I assign this functions to the page titled Blog -> is_page( ‘Blog’ ).

    Makes sense but don’t want to white screen my site!

    #105251

    braddalton
    Participant
    Post count: 9959

    Try this http://wpsites.net/web-design/change-layout-genesis/

    Another option is simply to edit the page and choose the sidebar content layout.


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

You must be logged in to reply to this topic.