• Resolved franvivar

    (@franvivar)


    Buenas

    me gustaria poder añadir la miga de pan de la pagina de producto para woocomerce, tengo un childtheme y se que va en el php functions.

    me podeis ayudar por favor?

    gracias

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there,

    I understand that you would like to display breadcrumbs on Single product pages, is this correct?

    You can use this code below to enable all breadcrumbs on your site:

    add_action( 'storefront_before_content', 'wc_remove_storefront_breadcrumbs', 0);
    
    function wc_remove_storefront_breadcrumbs() {
      if( !is_product() ) {
       remove_action( 'storefront_before_content', 'woocommerce_breadcrumb', 10 );
      }
    }

    Please note that this code is for the Storefront theme. You need to add the code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code Snippets plugin. Don’t add the custom code directly to your parent theme’s functions.php file, as this will be wiped entirely when you update the theme.

    Also, please note that we can’t provide support for code customization as per our support policy. In case you require further assistance, I’ll keep this thread open, allowing other members of the community to contribute their expertise.

    Hope this helps!

    Thread Starter franvivar

    (@franvivar)

    Hello Darla

    I dont want to enable all bredcrumbs.

    I just want to add breadcrumbs to the product page from functions.php

    If you could help me please.

    Thanks

    Thread Starter franvivar

    (@franvivar)

    with code

    Hi @franvivar

    To add breadcrumbs to the product page only, add the code below to the functions.php file of your child theme.

    add_action('woocommerce_before_single_product', 'woocommerce_breadcrumb', 20, 0);
    Thread Starter franvivar

    (@franvivar)

    Sorry Darla,

    with the breeadcrumb that you have send me before i change the hole bredcrumb, and i only wont to add the name of the product in the breeadcrumb that i have in the product page.

    I have this breeadcrumb in the child theme in functions.php

    add_filter( ‘woocommerce_breadcrumb_defaults’, ‘wcc_change_breadcrumb_home_text’);
    function wcc_change_breadcrumb_home_text( $defaults ) {
    // Change the breadcrumb home text from ‘Home’ to ‘Apartment’
    $defaults[‘home’] = ‘Gemelos camisa’;
    return $defaults;
    }

    do i have to change something in here to add the product breeadcrumb?

    Thank you and sorry for the circunstances

    Thread Starter franvivar

    (@franvivar)

    Hello Darla

    Could you find another breadcrumb for me

    Thank you

    Saif

    (@babylon1999)

    Hello @franvivar,

    I have this breeadcrumb in the child theme in functions.php

    Just to make sure we’re on the same page, this code was already avalible in your child theme, correct?

    If that’s the case, then please get in touch with your theme author about this, as any snippet we provide at this point could make things worse.

    You can also check the WooCommerce Breadcrumbs guide at https://woocommerce.com/document/customise-the-woocommerce-breadcrumb/

    Let us know if you have any other questions! :‎)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘migas de pan’ is closed to new replies.