[Resolved] Widget per page

Home Forums Support [Resolved] Widget per page

Home Forums Support Widget per page

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #390916
    Ohad

    Hello,

    Is there any option to select a specif widgets to show specifically for one page / post / or custom post type?

    for example,
    I have a contact us page (contact form 7),
    And i want only a Text widget in the side menu..

    is this possible?

    Best Regards,

    #391030
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This plugin should do the trick: https://wordpress.org/plugins/content-aware-sidebars/

    Let me know πŸ™‚

    #403318
    Ohad

    Hey Tom,

    is this plugin is good for the main blog page?

    And if not,
    is there any way to set a different blog layout for specific language (via Polylang plugin)?
    for example:

    English: content > sidebars
    Hebrew: sidebars > content

    #403433
    Tom
    Lead Developer
    Lead Developer

    You could use the generate_sidebar_layout filter: https://docs.generatepress.com/article/sidebar-layout/#using-a-function

    Something like this:

    add_filter( 'generate_sidebar_layout', 'tu_rtl_sidebar_layout' );
    function tu_rtl_sidebar_layout( $layout ) {
    
        if ( is_rtl() ) {
            return 'left-sidebar';
        }
    
        // Or else, set the regular layout
        return $layout;
    
     }
    #403513
    Ohad

    Thanks Tom,

    That did the trick πŸ™‚

    #403552
    Ohad

    Hey Tom,

    is there any way to limit this change, only to the Blog Page?
    Cause now, is see the left side bars in all my pages, and i want it only to the blog…

    #403621
    Leo
    Staff
    Customer Support

    Try this:

    add_filter( 'generate_sidebar_layout', 'tu_rtl_sidebar_layout' );
    function tu_rtl_sidebar_layout( $layout ) {
    
        if ( is_rtl() && is_home() ) {
            return 'left-sidebar';
        }
    
        // Or else, set the regular layout
        return $layout;
    
     }
    #403627
    Ohad

    Thank You Tom πŸ™‚

    #403653
    Tom
    Lead Developer
    Lead Developer

    Glad we could help! πŸ™‚

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.