[Resolved] Many breadcrumbs

Home Forums Support [Resolved] Many breadcrumbs

Home Forums Support Many breadcrumbs

  • This topic has 21 replies, 5 voices, and was last updated 3 years ago by patricia.
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #35157
    Mizanur

    Hi Tom,
    I am using breadcrumb by Yoast, as you have mentioned once here.

    All are ok, except, now the breadcrumb (Home » Blog) is showing on the top of each blog entry. A screenshot here.

    I want only once, top of the page only. Possible?

    Mizan
    [Oh, would like to see GeneratePress has its own breadcrumb implementation!]

    #35431
    Tom
    Lead Developer
    Lead Developer

    Hi Mizan,

    What hook are you adding the breadcrumb feature to?

    #35477
    Mizanur

    I put the following code ‘Before Content’ hook.

    <?php if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
    } ?>

    #35479
    Tom
    Lead Developer
    Lead Developer

    Before Content will show up before the content of everything – posts and pages (including excerpts).

    You can add this in the “After Header” hook:

    <div class="page-header grid-container grid-parent">
    <?php if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    } ?>
    </div>
    #35487
    Mizanur

    If I put the code After Header hook the breadcrumb shows up all the way left.

    My webpage LAYOUTt width is set to 1000px
    It should be automatically aligned with layout length.

    I tried with your code but it is giving me some extra characters! yoast_breadcrumb was fine.

    #35491
    Tom
    Lead Developer
    Lead Developer

    The piece of code that makes sure it won’t show up all the way to the left is this:

    <div class="page-header grid-container grid-parent">
    .... Yoast stuff in here
    </div>

    Not sure how it would be giving you extra characters? Maybe the formatting was off.

    Try taking the above, and then replacing the …. Yoast stuff in here with the code provided by WordPress SEO.

    #35495
    Mizanur

    1) I put the following code in After Header Hooks:

    <div class=”page-header grid-container grid-parent”>
    <?php if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
    } ?>
    </div>

    Result: I got breadcrumb all the way left and some ‘); } ?> characters

    2) I put the following code in After Header Hook:

    <?php if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
    } ?>

    Result: I got breadcrumb all the way left. No special characters shown.

    Just wondering why the breadcrumb is not aligning with the Layout!

    #35504
    Tom
    Lead Developer
    Lead Developer

    The quotation marks in your above code are being formatted weirdly, which would cause the issues you’re explaining.

    Try this: https://gist.github.com/generatepress/14b3e8a93175f11d9545

    There’s no reason why that wouldn’t work.

    Let me know.

    #35508
    Mizanur

    Hi Tom,

    I used github code it seems like the characters are gone! Sreenshot of hook

    But the alignment issue still persists. Bangladesh Circle

    I think today is Tuesday, nothing works on Tuesday. 🙂
    Mizan

    #35510
    Tom
    Lead Developer
    Lead Developer
    #35512
    Mizanur

    Yeap, the spell is broken! It works. 🙂
    Thanks a million, Tom
    Mizan

    #158196
    Alain León

    After so many comments and errors have been very confused. Also my level of knowledge is very basic, please indicate below could what code to be inserted and where to properly activate the breadcrumbs?

    #158209
    Alain León

    I think it would be good to have to install additional plug only if it can be inserted directly into the code, do not understand why you have not added that function to issue an update, like a button back to top

    #158210
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I agree! This is an option I’d like to add to an update in the future.

    If you’re using the Yoast SEO plugin, they have a breadcrumbs feature. If you enable that feature, you can paste the above code (https://gist.github.com/generatepress/14b3e8a93175f11d9545) into the “After Header” hook in “GP Hooks”.

    That will show the breadcrumbs.

    Let me know if you need more info 🙂

    #158227
    Alain León

    I enabled the feature in Breadcrumbs Yoast SEO Plugin and I inserted the code in After Header Hooks, and this is what shows me where the breadcrumbs should appear:
    ‘,’
    ‘); } ?>

Viewing 15 posts - 1 through 15 (of 22 total)
  • The topic ‘Many breadcrumbs’ is closed to new replies.