Tagged: breadcrumb
-
AuthorPosts
-
December 18, 2013 at 7:42 pm #201633
Hello,
i have an issue with breadcrumb on post,
they do not work on some topic; but not alli used WP3.8 and latest Enfold version
December 19, 2013 at 2:12 am #201797Hey cyrtocara!
Do you have any plugins installed? Can you please elaborate the issue? A link to the post with incorrect breadcrumb will help.
Best regards,
IsmaelDecember 19, 2013 at 7:30 am #201918This reply has been marked as private.December 20, 2013 at 10:56 am #202519Hi!
Please create me an admin account and post the login data as private reply – I’ll look into it.
Cheers!
PeterDecember 20, 2013 at 3:42 pm #202590This reply has been marked as private.December 20, 2013 at 3:45 pm #202592This reply has been marked as private.December 23, 2013 at 9:46 am #203208This reply has been marked as private.December 24, 2013 at 10:53 am #203529Hi!
I made a syntax mistake while I tested my code. Please upload the original enfold/functions.php file to restore your website. Then insert following code at the end of the functions.php file to add the category to the breadcrumb.
if(!function_exists('avia_modify_single_post_breadcrumb')) { function avia_modify_single_post_breadcrumb($trail) { if(!is_single()) return $trail; $category = get_the_category(get_the_ID()); if(empty($category)) return $trail; $newtrail = array(); foreach($category as $cat) { if(empty($cat->parent)) { $category_link = get_category_link($cat->term_id); $newtrail[] = '<a href="'.esc_url( $category_link ).'" title="'.$cat->cat_name.'">'.$cat->cat_name.'</a>'; } } if(empty($newtrail)) return $trail; array_unshift($newtrail, $trail[0]); $newtrail['trail_end'] = $trail['trail_end']; return $newtrail; } add_filter('avia_breadcrumbs_trail','avia_modify_single_post_breadcrumb'); }
Btw – this is not a bug of the theme but a design decision. Kriesi normally shows the blog page link in the breadcrumb and not a category link. It seems like you didn’t select a blog page (Enfold > Theme Options) and thus the blog page also won’t show up in the breadcrumb. The code I give you now will replace the default breadcrumb with a category based breadcrumb.
Best regards,
PeterDecember 24, 2013 at 11:26 am #203538This reply has been marked as private.December 24, 2013 at 11:38 am #203542Hi!
I changed the code and it should work now. I altered the function name and thus the filter function callback didn’t work.
Regards,
PeterDecember 24, 2013 at 11:50 am #203555Works perfectly now,
Regards,
Emmanuel -
AuthorPosts
- The topic ‘Breadcrumb problem’ is closed to new replies.