Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #27022

    To start, my WordPress permalink structure is set up like this (pretty standard):

    (same thing as choosing the “Post Name” option within Settings -> Permalinks)

    In my blog section (called “News”), I have a post at the URL.

    Right now the breadcrumb on the post page is displaying like this:

    “You are here: Home » News » Press » News » [post-title]”

    “Reviews” and “Press” are Post categories for the post. I don’t want any of the categories to be displayed within the breadcrumb. It should just read:

    “You are here: Home » News » [post-title]”

    How do I modify or fix this?




    Edit framework > php > class-breadcrumb.php, find this code on line 283:

    if('post' == $post_type)
    $category = get_the_category();
    $ID = $category[0]->cat_ID;

    $parents = get_category_parents($ID, TRUE, '$$$', FALSE );
    $parents = explode("$$$", $parents);
    foreach ($parents as $parent_item)
    if($parent_item) $trail[] = $parent_item;

    Remove it.




    Will this edit be overwritten if the theme is ever updated?


    Okay I tried this and it’s very close, but the structure I’m getting now is:

    You are here: Home » News » News » [post title]

    With a double “News” within the breadcrumb. Any suggestions?


    Can you post a link to the page where the breadcrumb doesn’t display right? Ismaels code modification should remove all category links and I checked the blog posts (eg ) and the breadcrumb seems to be correct with

    You are here: Home » News » Reviews & Press from Video Games Live Concert


    Hi Dude,

    I attempted to fix the problem myself, but I ended up messing up the structure of the breadcrumbs on all the pages (but fixed the problem with the blog posts). I have reverted back to the original class-breadcrumbs.php along with your suggested update from above and now you can see that it isn’t working correctly when viewing a single blog post (still getting the double “News > News”) category within the breadcrumb. But now the pages are working correctly. You can take a look here:



    Please add this on your custom.css or Quick CSS to hide the duplicated link on single posts.

    .single .breadcrumb-trail a:nth-child(4) {
    display: none;

    .single .breadcrumb-trail span.sep:nth-child(3) {
    display: none;




    That works! Thank you.



    Glad it worked. This is a temporary solution, I’m not sure if you will encounter any issues on the future.



Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Breadcrumbs not respecting permalink structure’ is closed to new replies.