Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #260189

    At the top of a post it shows breadcrumbs

    Here is an example of a post: http://shutterliving.com/paris/

    I think I have set my page structure wrong as this is what the breadcrumbs says:

    You are here:Home / Blog Post / Paris

    How can I change the words shown?

    Currently the middle crumb says ‘BLOG POST’ and links me to a strange page, ( I think it is a ‘Archive Category’ page) I want the middle crumb to say ‘Recent Work’ and link back to this page:

    http://shutterliving.com/recent-work/

    Any ideas how i correct this or do I not understand how this should work.

    • This topic was modified 10 years, 7 months ago by Jamie A. Reason: Rewritten, hopefully makes more sense
    #261180

    Hi Jamie A!

    Please go to Enfold > Theme Options and select the “Recent Work” page as blog page in the “And where do you want to display the Blog?” dropdown. If you want to use a custom blog layout on the “Recent Work” page go to Enfold > Blog Layout and select “Blog layout” > “Use the advance layout editor to build your own blog layout (simply edit the page you have chosen in Enfold->Theme Options as a blog page)”.

    Regards,
    Peter

    #261325

    Dude,

    Thanks for the clear explanation. I have done what you asked and it has improved the situation!

    Selected: use advanced layout editor, under Enfold theme options – BLOG LAYOUT
    &
    Under THEME OPTIONS I selected Recent Work

    It now displays in the bread crumbs the ‘Recent Work’ however it also shows BLOG in the breadcrumbs as well?

    here is an example (shutterliving.com/bookshelf/)

    How do i remove this breadcrumb from showing up as it links to a random page?

    Thanks in advance!

    #261387

    Could this have something to do with categories?
    The posts that are shown on the ‘blog/recent work’ page all belong to a category called ‘blog post’?

    #261653

    Hi!

    Tbh I’m not sure why WordPress displays this “Blog Post” link. If the posts belong to such a category (you can check that on the admin page) then yes, this is the reason. Imo a third party plugin can affect the breadcrumb output too and maybe try to deactivate all plugins to check if a plugin is the culprit.

    However you can remove this link by modifying the theme files – just insert following code into your child theme functions.php file or enfold/functions.php:

    
    
    add_filter('avia_breadcrumbs_trail', 'avia_change_breadcrumb', 10, 15);
    function avia_change_breadcrumb($trail) {
    if(is_single() && get_post_type() == "post")
    {
            foreach($trail as $key => $data)
            {
                    $search = 'Blog Post';
                    if(strpos($data, $search) !== false)
                    {
                                      unset($trail[$key]);
                    }
            }
    }
    return $trail;
    }
    

    Cheers!
    Peter

    #305733

    Hi this worked to remove the ‘Blog Post’ link from the bread crumbs, however is there any way to remove ALL the categories from the bread crumbs?

    Best Jamie

    #307257

    Hey!

    Yes, try this code – it will just display the blog page and the post title in the breadcrumb. It will strip the post categories:

    
    
    add_filter('avia_breadcrumbs_trail', 'avia_change_breadcrumb', 20, 1);
    function avia_change_breadcrumb($trail) {
             if(is_single() && get_post_type() == "post")
             {
                      $newtrail = array();
                      $blog = avia_get_option('blogpage'); 
                      $newtrail[0] = '<a href="' . get_permalink( $blog ) . '" title="' . esc_attr( get_the_title( $blog ) ) . '">' . get_the_title( $blog ) . '</a>'; 
                      $newtrail['trail_end'] = $trail['trail_end'];
    
                      $trail = $newtrail;
             }
             return $trail;
    }
    
    

    Regards,
    Peter

    #307820

    Hi Peter ,

    Unfortunately it did not work. Any ideas (do i have to remove the previous code that you gave me to get it to work)?

    #307840

    Hi!

    Yes, the code I posted here: https://kriesi.at/support/topic/incorrect-breadcrumbs/#post-307257 should replace the code I posted here: https://kriesi.at/support/topic/incorrect-breadcrumbs/#post-261653

    Best regards,
    Peter

    #307859

    Thanks – Resolved !

    very best

    Jamie

    #307875

    Hey!

    Great – glad I could help you :)

    Cheers!
    Peter

    #308874

    Resolved – thanks All!

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Incorrect Breadcrumbs?’ is closed to new replies.