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

    Hello,
    I want to display a sidebar in product tag page, but I don’t see a specific setting for it in /wp-admin/admin.php?page=avia#goto_styling
    Our setting regarding “Sidebar On Pages” is set to “No sidebar”

    Ps.: I am using Widget Options

    I tried already
    is_tax(‘product_tag’)
    as in https://kriesi.at/support/topic/add-sidebar-to-woocommerce-product-tags/#post-624464
    and also is_product_tag()

    Please see screenshots
    Thank you
    Mauro

    #1360878

    Hi profumopuntoit,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( to be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #1361108
    This reply has been marked as private.
    #1361323

    Hi Mauro,

    Thanks for giving us admin access.
    The sidebar for the product tag page is dependent upon Sidebar On Archive Pages however it does not seem to respond on your staging site.
    Also, where did you modify the number of items to show on the shop page? the default should be 3 but it shows 5, I think some of the code might be causing the issue.

    Best regards,
    Nikko

    #1361334

    Thank you Nikko for looking into the issue
    I have disabled Asset CleanUp: Page Speed Booster plugin that might interfere because it caches the css
    The number of items to show on the shop page are set in WooCommerce products setting page
    Please see screenshot https://imgur.com/a/WlGJX7M

    Mauro

    #1361345

    i needed a sidebar on my search results page – so i think you had to modify only the if clause for your case:

    function avia_change_sidebar_layout($layout, $post_id) {
        if( is_search() ) {
            $layout['current'] = $layout['sidebar_right'];
            $layout['current']['main'] = 'sidebar_right';
        }
        return $layout;
    }
    add_filter('avia_layout_filter', 'avia_change_sidebar_layout', 10, 2);

    if you like to place a custom side bar there ( pay attention it is case-sensitive ):

    
    add_filter("avf_custom_sidebar", function($custom_sidebar) {
        if( is_search() ) {
            $custom_sidebar = "Your Custom Sidebar Name"; 
        }
        return $custom_sidebar;
    }, 10, 1);
    #1361360

    Thank you Guenni007, It works!
    For future reference, I just had to change the if condition like this

    function avia_change_sidebar_layout($layout, $post_id) {
    if( is_product_tag() ) {
    $layout[‘current’] = $layout[‘sidebar_right’];
    $layout[‘current’][‘main’] = ‘sidebar_right’;
    }
    return $layout;
    }
    add_filter(‘avia_layout_filter’, ‘avia_change_sidebar_layout’, 10, 2);

    add_filter(“avf_custom_sidebar”, function($custom_sidebar) {
    if( is_product_tag() ) {
    $custom_sidebar = “product_tag”;
    }
    return $custom_sidebar;
    }, 10, 1);

    #1361400

    Hi profumopuntoit,

    We’re happy to hear that :)
    Thanks for providing the solution that worked for you.

    Also thanks to @Guenni007 for always helping out :)

    Best regards,
    Nikko

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Display a sidebar in product tag page’ is closed to new replies.