Answer the question
In order to leave comments, you need to log in
How to change sidebar position?
I created my own archive-product.php template, copied the hooks, edited some of them for myself.
When I move the hook do_action( 'woocommerce_sidebar' );
to a different location (so that it appears on the left instead of on the right), it still appears on the right, as if I didn't make any edits to the template. I write symbols below - they are displayed where, in theory, the sidebar should have been displayed.
Moreover, when I comment on this hook, the sidebar still shows
up. What's the catch? Maybe somewhere the order of calling hooks is specified, but where?
Answer the question
In order to leave comments, you need to log in
Found a solution.
I use the theme recommended during the installation of WooCommerce - Storefront
Path /wp-content/themes/storefront/inc/woocommerce/storefront-woocommerce-template-function.php I'm interested
in
functions function storefront_before_contenr()
and after closing the main block it is called and if it is moved to that the sidebar will be rendered before the main block in the DOM function storefront_after_content()
function storefront_after_content()
do_action('storefront_sidebar')
function storefront_before_content()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question