-
AuthorPosts
-
August 5, 2022 at 2:26 pm #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- This topic was modified 2 years, 3 months ago by profumopuntoit.
- This topic was modified 2 years, 3 months ago by profumopuntoit.
August 6, 2022 at 5:17 am #1360878Hi profumopuntoit,
Please post us your login credentials (in the “private data” field), so we can take a look at your backend.
- Install and activate ” Temporary Login Without Password “.
- Go to ” Users > Temporary Logins ” on the left-side menu.
- Click ” Create New “.
- 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 ). - Click ” Submit “.
- 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,
NikkoAugust 8, 2022 at 1:26 pm #1361108This reply has been marked as private.August 10, 2022 at 10:48 am #1361323Hi 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,
NikkoAugust 10, 2022 at 11:57 am #1361334Thank 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/WlGJX7MMauro
August 10, 2022 at 12:55 pm #1361345i 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);
August 10, 2022 at 2:23 pm #1361360Thank you Guenni007, It works!
For future reference, I just had to change the if condition like thisfunction 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);August 11, 2022 at 5:14 am #1361400Hi 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 -
AuthorPosts
- The topic ‘Display a sidebar in product tag page’ is closed to new replies.