I'm trying to display the primary sidebar on a custom taxonomy archive page. The site uses Genesis and the default site layout is set to Content/Primary Sidebar. The custom taxonomy archive template is set to Content/Primary Sidebar.
The custom taxonomy archive displays WooCommerce products associated with the custom taxonomy term. It looks as though the sidebar is there but the widget content does not display. The primary sidebar and widgets are not present in the html markup
EG lien caché
A test custom taxonomy archive set to display post categories does show the primary sidebar and widget content.
Eg lien caché
Assuming something to do with WooCommerce.
All and any help much appreciated.
Hi,
Thank you for contacting us and I'd be happy to assist.
Based on your report, I've performed some tests on my website and was able to reproduce this behavior. When using the Genesis theme, if Toolset WordPress Archive is used for the WooCommerce product archive (shop) or the product taxonomy archive, the sidebar widgets become missing.
I've shared these findings with the concerned team for further review and for now, as a temporary/quick fix, you can use the following custom code:
add_action( 'toolset_genesis_woocommerce_after_main_content', 'genesis_toolset_sidebar_fix', 1,1 );
function genesis_toolset_sidebar_fix() {
get_sidebar('Primary Sidebar');
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
regards,
Waqar
Hi Waqar
Thank you - I think this is nearly there!
Now, the sidebar area is showing in the html, but the Primary Sidebar Widgets aren't displaying. There's a Custom HTML widget that should be displaying and isn't. Could you offer any further assistance on this?
Much appreicated.
Thanks for the update and glad that it worked.
I couldn't reproduce this on my test website and the widgets added in the "Primary Sidebar" widget area, are showing as expected.
Can you please save the widget in the widget area again and make sure to clear all involved caches?
In case the issue persists, you're welcome to share temporary admin login details of the website, for further troubleshooting.
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
Thank Waqar. I changed the default layout in theme settings and that seemed to sort it.
My issue is resolved now. Thank you!