Site logo

Archived topic

Move breadcrumbs above left sidebar in woocommerce pages

22 replies · Started by John MacKenzie on December 16, 2020

Viewing posts 1–15 of 23

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

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;
}
This archived topic is closed to new replies.