[Resolved] Different sidebars for posts and pages

Home Forums Support [Resolved] Different sidebars for posts and pages

Home Forums Support Different sidebars for posts and pages

Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #494546
    Tom
    Lead Developer
    Lead Developer

    I’m always happy to help when I can 🙂

    Thanks again!

    #1366993
    Greg

    Is there a way to add my own options to GP’s Layout > Sidebars area in the page editor? If there’s an action or filter, I’d like to just add a list of sidebars right there to choose from, and not have to add another plugin with it’s messy interface. 🙂

    #featurerequest

    #1367008
    Greg

    Found generate_layout_meta_box_content and generate_layout_meta_box_save. I’ll play around with this.

    #1367202
    Tom
    Lead Developer
    Lead Developer

    That’s the best place to look, for sure.

    Also, keep an eye on our upcoming version, as some things have changed in that area: https://github.com/tomusborne/generatepress/tree/release/2.5.0

    #1659673
    Juan Ramón

    Here’s a new and happy GP Premium user who finally got to debut a new sidebar on my chid theme just for pages thanks to this 2018 thread XD Thank you both!

    New sidebar for pages

    JRMora / Cartoonist https://www.jrmora.com/blog

    #1861679
    Jatin

    I want to have a different siderbar which i can create from a page using shortcodes. However, is there any way to display it on a page. Rest of the site can follow the standard sidebar.

    Its been almost 2 + years of this post. Not sure if this functionality is natively available using Hooks or something ?

    #1861743
    Leo
    Staff
    Customer Support

    Not sure if I fully understand the requirement specifically on the shortcodes part.

    This plugin is still likely your best bet:
    https://en-ca.wordpress.org/plugins/content-aware-sidebars/

    If you need further help, please start a new topic.

    Thank you!

    #1912525
    Jacob

    Hi Generatepress,

    I am battling the same issue as the ones previously in this thread.

    I have gone with content aware, and set up everything as it should (or so I imagine at least)

    On my test page, the original sidebar is removed, and it revert to default, instead of updating with the new sidebar.

    Check: https://childrenstoybox.co.uk/best-electric-scooters-in-the-uk/

    Do u have an idea as to whats going wrong here?

    Kind Rgards

    Jacob

    #1912613
    David
    Staff
    Customer Support

    Hi there,

    can you share a screenshot of the Content Aware settings?

    #1913218
    Jacob

    HI David,

    Sure, here are the screenshots

    Conditions: https://prnt.sc/1qtwet3
    Action: https://prnt.sc/1qtwh2v
    Design: https://prnt.sc/1qtwiw1
    Schedule: https://prnt.sc/1qtwkze
    Options: https://prnt.sc/1qtwmkt

    This is how the setting looks right now. Hope u can help me.

    Thanks

    Jacob

    #1915065
    Jacob

    HI David,

    Did u have an idea, as to what’s causing the plugin not to work?

    Kind Regards

    Jacob

    #1915163
    David
    Staff
    Customer Support

    Have you tested it with the cache plugin disabled ?

    #1916400
    Jacob

    Problem solved. The actual widget was not updated correctly.

    Thanks

    Jacob

    #1916534
    David
    Staff
    Customer Support

    Glad to hear you found the answer!!!

    #2107394
    Burke

    What I did was

    1. duplicate /inc/general.php into my child theme
    2. In that file, after

    'sidebar-1' => __( 'Right Sidebar', 'generatepress' ),
     'sidebar-2' => __( 'Left Sidebar', 'generatepress' ),

    I added:

    'sidebar-3' => __( 'Right Special Sidebar', 'generatepress' ),

    3. duplicate /sidebar.php into my child theme
    4. Add:

    if ( is_page() ) {
    	if ( ! dynamic_sidebar( 'sidebar-3' ) ) {
    		generate_do_default_sidebar_widgets( 'right-special-sidebar' );
    	}
    } else {
    	if ( ! dynamic_sidebar( 'sidebar-1' ) ) {
    		generate_do_default_sidebar_widgets( 'right-sidebar' );
    	}
    }
Viewing 15 posts - 16 through 30 (of 31 total)
  • The topic ‘Different sidebars for posts and pages’ is closed to new replies.