Archived topic
Move breadcrumbs above left sidebar in woocommerce pages
22 replies · Started by John MacKenzie on December 16, 2020
I tried using the function code and settings on this page
https://generatepress.com/forums/topic/woocommerce-shop-move-page-title-and-breadcumbs-on-top/
adding a header element with display Generate_before_left_sidebar_Content
but it just prints the shortcode? how can I fix the function for the shortcode to work?
yes I set the hook to run shortcode.
Thnaks!
Hi,
Can you test the same shortcode on a page's contents using the shortcode block on Gutenberg editor? To check if the shortcode actually works.
Let us know. :)
no it just prints the shortcode on a normal page as well.
no it just prints the shortcode on a normal page as well.
Thanks.
That means the shortcode isn't working.
To clarify: Is this the one you've copied?
function woocommerce_bcm() {
woocommerce_breadcrumb();
}
add_shortcode( ‘woocommerce_bc’, ‘woocommerce_bcm’ );
If so, can you check for syntaxes? ‘ should be replaced with '. Curly/smart quotes can cause issues within the code. Straight quotes should be used instead.
thanks! ok so now how to i remove the breadcrumbs from above the product container?
thanks!
John
thanks! ok so now how to i remove the breadcrumbs from above the product container?
With the WooCommerce Module enabled on Appearance > GeneratePress, "Display Breadcrumbs" can be disabled by unchecking it via Appearance > Customize > Layout > WooCommerce.
https://docs.generatepress.com/article/woocommerce-overview/#layout
oh great thanks i thought that was going to turn off both but i should have tried.
thanks!
John
one more thing it appears the breadcrumbs dont stretch across the top of the page they stay squished in the left column?
thanks!
John
Hi there,
you would hook your Shortcode into the generate_after_header hook and to stop it being full width you would need to wrap it in a grid-container div eg.
<div class="grid-container">
<!-- shortcode here -->
</div>
thanks!
You're welcome
reopening because this setting doesnt put the breadcrumbs above the left sidebar it puts it all the way over to the right of the screen (stretched) i need them to start above the left sidebar and extend overtop the main column depending on how long it is.
thanks!
Can you provide a link to where i can see the issue.
thanks
Try adding this CSS:
.nav.woocommerce-breadcrumb {
max-width: 1200px;
padding: 20px;
margin: auto;
}