Take your website
To the next level
Discover our newly launched customization services and elevate your web projects to new heights.
Delegate tasks, save time, and unlock the power of professional WordPress outsourcing.

Okay
  Public Ticket #2032813
product breadcrumb
Closed

Comments

  • mariusanhalt started the conversation

    Hi

    How do I make the product categories visible in the breadcrumbs, so visiters can see the whole trail like:

    Home > Shop > parent category ect > category > product

    ??

    because as for now they can only see Home > Shop > product


    Best,

    Marius

  •  7,095
    Oliver replied

    Hi,

    The simplest way will be use  Youast breadcrumbs, there should be settings to make it:

    Change line 1030 

    $breadcrumbs = '<div class="breadcrumbs-container"><div class="container">' . ob_get_clean() . '</div></div>';

    to this one, in the functions.php  

    if ( !function_exists( 'yoast_breadcrumb' ) ) {     
     require_once '/inc/wpseo-functions.php';  }  
    $breadcrumbs = '<div class="breadcrumbs-container"><div class="container">'. yoast_breadcrumb('','',false) .'</div></div>';

    If you need to make it in the child theme, copy the function to the functions.php of the child theme:

    function thegem_page_title() 

    and rename it to 

    function thegem_page_title_new() 

    Now you need to change it in the templates:

    /wp-content/themes/thegem/woocommerce.php

    /wp-content/themes/thegem/404.php

    /wp-content/themes/thegem/content-page.php

    wp-content/themes/thegem/index.php

    /wp-content/themes/thegem/search.php

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • mariusanhalt replied

    Great... That works fine.. Thanks... But now I have two sets of breadcrumbs, the one I wish and another one on the top close to the header. How do I hide/remove the top one so I only have the one under the title with the categories.

    If I try some of the "Hide Breadcrumbs" functions it either hides both of them, or hides the wrong one.

    I have attached a screenshot 

    Best,

    Marius

  •  7,095
    Oliver replied

    HI!

    pls. use following css:

    .breadcrumbs {
        display: none;
    }

     

    6707465710.png

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver

  • mariusanhalt replied

    Yep, that seem to do the trick..


    Thanks,

    Marius

  •  7,095
    Oliver replied

    You're welcome!

    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver