Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1178209
    sykomor
    Participant

    Hi,
    I have 2 sidebars on my webpage organicseries.pl
    On is for woocommerce -> (see “sklep” section) and all product pages and other one for blog -> blog section.
    I’ve assinged second sidebar to blog with “unlimited sidebars” plugin.
    It works fine but it’s not showing on post page. I know i can assign it manually to specific post but how to assign it automatically to all post’s?

    best regards,
    Radek

    #1178514
    Nabeel A
    Moderator

    Hi Radek,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1181333
    sykomor
    Participant
    This reply has been marked as private.
    #1181603
    Rad
    Moderator

    Hi there,

    Please add this code to your child theme’s functions.php

    add_filter( 'ups_sidebar', 'x_force_sidebar', 9999 );
    
    function x_force_sidebar ( $default_sidebar ) {
    
      $sidebars = get_option( 'ups_sidebars' );
    
      foreach ( $sidebars as $id => $sidebar ) {
        if (  is_singular('post') ||  is_tag() || is_category() ) {
          if ( array_key_exists( 'index-blog', $sidebar ) && $sidebar['index-blog'] == 'on' ) {
            return $id;
          }
        }
      }
    
      return $default_sidebar;
    
    }

    This will display the same sidebar you assigned on your blog page.

    About your second question, if it’s same site/project then there is no need for another license. Though, you can only validate your purchase key in a single installation. You may then try multi-site setup.

    Thanks!

  • <script> jQuery(function($){ $("#no-reply-1178209 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>