• Resolved Nicolaie

    (@szabadkai)


    Hi,
    I’m using the plugin Add Meta Tags and George implemented Google Breadcrumbs.
    My problem is that your theme needs a tiny adjustment.
    In the file wp-content/themes/customizr/inc/parts/class-content-breadcrumb.php there is an addition on line 153 needed like this:

    $breadcrumb = ‘<‘ . tag_escape( $args[‘container’] ) . ‘ class=”breadcrumb-trail breadcrumbs” id=”breadcrumbs” itemprop=”breadcrumb”>’;

    Like this we could reference it from AMT and use it when generating the Meta Tags.

    Could you be so kind? Or is there an alternative?

    Thanks
    Nicolaie

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello Nicolaie,
    you might want to add the following code to your child-theme functions.php:

    add_filter('tc_breadcrumb_display', 'add_breadcrumb_id');
    function add_breadcrumb_id( $breadcrumb ){
      return str_replace('itemprop="breadcrumb"', 'id="breadcrumbs" itemprop="breadcrumb"', $breadcrumb);
    }

    Then your breadcrumb will look like this:
    <div class="breadcrumb-trail breadcrumbs" id="breadcrumbs" itemprop="breadcrumb">

    is this what you want? right?

    Thread Starter Nicolaie

    (@szabadkai)

    Yes d4z_c0nf,

    thank you very very much!
    Works now perfectly! Wonderful!

    Cheers
    Nicolaie

    Thread Starter Nicolaie

    (@szabadkai)

    One little systematic question:
    Now I turn breadcrumbs on, then i hide them und use your filter.
    Could not it be better to have them turned on by default and use the option in the theme to be shown or unhide?

    Mmm,
    if you use my filter above with the breadcrumb turned off.. well it will not work.
    I don’t really get what you mean though 🙂
    Do you mean that you want the breadcrumb printed but not visible?
    So you can turn it on use that filter and hide it with css:

    .tc-hot-crumble {
        display: none;
    }

    Sorry if I misunderstood.

    Thread Starter Nicolaie

    (@szabadkai)

    Thats what i am doing right now.

    I suggest breadcrumbs to be turned on by default but not visible in the themes.
    By this you could use it in the Meta Data and hand it over to Google, Yahoo, Bing, Yandex or Baidu.

    When needed by the user, he can then make them visible via your option. Where ever he wants or needs.

    It is a change i the logic. Hope I was a bit more clear now.

    Yeah I see what you mean,
    thanks for the suggestion, will see what theme authors thinks about that 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Making breadcrumbs linkable’ is closed to new replies.