Support » Theme: Sinatra » Breadcrumb for individual post including ‘blog’

  • Resolved bojates

    (@bojates)


    Hi,

    I am getting an extra ‘blog’ breadcrumb on individual posts.

    I have my site setup with a static homepage. The blog index is called ‘The Library’ at /library/. I have a custom permalinks structure as follows: /library/%category%/%postname%/

    This all seems to work fine, except on the individual posts pages, where the breadcrumbs are adding in an extra ‘blog’.

    A post in the category (Members’ Consultation) has breadcrumbs as follows:
    Home > Blog > The Library > Coffee table > Members’ Consultation

    Both ‘Blog’ and ‘The Library’ go to the blog index at /library/.

    The Coffee Table category index seems to work fine with breadcrumbs:
    Home > The Library > Coffee table

    Do you know why this is happening and what I can do about it?

    Thank you!

    p.s. the theme is fantastic!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Following…
    And how do you update the blog index to something else besides “blog”?

    Thread Starter bojates

    (@bojates)

    I’m not sure exactly what you mean, but I think this is a general WordPress question. I think this is what you mean you want to do.

    Create a page to be the blog index. In my case ‘Library’. And give it a slug that you want. e.g. /library/

    Then in Settings > Reading you choose for your homepage to be a static page (you choose the static page from your pages as well) and you choose the one you’ve created for the blog to be the posts page (in my case, Library).

    Sorry if this isn’t what you meant.

    Branko

    (@brankoconjic)

    @bojates

    You can remove the ‘Blog’ breadcrumb item with this line of code:

    remove_filter( 'sinatra_breadcrumb_trail_items', 'sinatra_breadcrumb_trail_items', 10 );

    You can add the code snippet to the functions.php file of your Child theme (if using one) or use a plugin for adding code snippets such as this one.

    If you like Sinatra theme and have a minute of your time, please leave a review here, that means a lot to us. 🙂

    Thread Starter bojates

    (@bojates)

    That’s great, thank you!

    In fact it didn’t work in my child theme. I believe because the child theme functions.php gets loaded before the parent theme. This worked, however, which is based on some info I found elsewhere:

    add_action( 'after_setup_theme', 'remove_parent_filters' );
    function remove_parent_filters(){ 
        remove_filter( 'sinatra_breadcrumb_trail_items', 'sinatra_breadcrumb_trail_items', 10 ); 
    }

    Please shout if there’s a better way.

    And, yes, I will leave a review, thank you!

    • This reply was modified 3 years, 9 months ago by bojates.
    Branko

    (@brankoconjic)

    @bojates,

    Thanks for sharing your solution. That’s a good way to do it, no need to change your code 🙂

    Theme Author sinatrateam

    (@sinatrateam)

    Resolving this issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Breadcrumb for individual post including ‘blog’’ is closed to new replies.