Tagged: breadcrumbs
-
AuthorPosts
-
May 5, 2014 at 11:36 am #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
May 7, 2014 at 8:15 am #261180Hi 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,
PeterMay 7, 2014 at 3:47 pm #261325Dude,
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 WorkIt 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!
May 7, 2014 at 5:02 pm #261387Could 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’?May 8, 2014 at 7:03 am #261653Hi!
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!
PeterAugust 18, 2014 at 2:05 pm #305733Hi 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
August 21, 2014 at 10:53 am #307257Hey!
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,
PeterAugust 22, 2014 at 1:23 pm #307820Hi 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)?
August 22, 2014 at 2:01 pm #307840Hi!
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,
PeterAugust 22, 2014 at 2:33 pm #307859Thanks – Resolved !
very best
Jamie
August 22, 2014 at 2:54 pm #307875Hey!
Great – glad I could help you :)
Cheers!
PeterAugust 25, 2014 at 4:40 pm #308874Resolved – thanks All!
-
AuthorPosts
- The topic ‘Incorrect Breadcrumbs?’ is closed to new replies.