
-
AuthorPosts
-
March 1, 2018 at 1:37 pm #919614
I have a page here which brings in posts from a particular category: https://a-e-s-uk.co.uk/tech-tips/
A post example is https://a-e-s-uk.co.uk/tech-tips/how-to-measure-an-8×4/Now the URL structure is fine but the breadcrumb states news instead of tech-tips like the URL.
I have a news section https://a-e-s-uk.co.uk/news/ which contains all other news.
How can I update the Breadcrumb to match the category/URL structure?
March 1, 2018 at 3:30 pm #919690Hey coady2311,
Please go to Settings > Permalinks, then select Custom Structure, then on it’s field on the right side add this:
/%category%/%postname%/
Hope this helps :)
Best regards,
NikkoMarch 1, 2018 at 6:00 pm #919781Hi I have this set already /%category%/%postname%/
March 1, 2018 at 7:08 pm #919811March 1, 2018 at 7:24 pm #919821No I don’t
March 1, 2018 at 7:55 pm #919843Hi,
Are you running Yoast? Sorry for the follow-ups, just trying to narrow things down.
Best regards,
Jordan ShannonMarch 1, 2018 at 8:48 pm #919874Yes Yoast is installed.
I can give you logins.
March 1, 2018 at 8:56 pm #919875Hi,
If you disable yoast briefly does the issue resolve or persist? Also, yes having the login info may prove useful if we can’t get this nailed down pretty quickly.
Best regards,
Jordan ShannonMarch 1, 2018 at 10:24 pm #919982Hi, tried disabling and it doesn’t change,
March 1, 2018 at 10:42 pm #919991Hi,
Okay, thank you for the attempt. Please add admin info in the private area so we can look into this further.
Best regards,
Jordan ShannonMarch 2, 2018 at 11:12 am #920221This reply has been marked as private.March 2, 2018 at 4:13 pm #920408Hi,
Thanks for giving us admin access, I have checked in Appearance > Editor and found that this file is causing the issue: enfold > framework > php > class-breadcrumb.php (line 282-305):
/*if('post' == $post_type && $show_categories) { $category = get_the_category(); foreach($category as $cat) { if(!empty($cat->parent)) { $parents = get_category_parents($cat->cat_ID, TRUE, '$$$', FALSE ); $parents = explode("$$$", $parents); foreach ($parents as $parent_item) { if($parent_item) $trail[] = $parent_item; } break; } } if(isset($category[0]) && empty($parents)) { $trail[] = '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>'; } }*/
Please remove the comment, so the code can work again, it doesn’t allow changes via Appearance > Editor, so changing it via ftp is the other option.
Best regards,
NikkoMarch 2, 2018 at 4:32 pm #920424Hi,
Thanks for this, I have removed the code and now I have this
Double news in the breadcrumb
https://a-e-s-uk.co.uk/news/successful-training-day-gloucestershire-fire-rescue/ it also creates this page https://a-e-s-uk.co.uk/category/news/When on this page https://a-e-s-uk.co.uk/tech-tips/how-to-measure-an-8×4/
The breadcrumb is
HOME/NEWS /TECH TIPS /WHEEL ALIGNMENT /HOW TO MEASURE AN 8X4
It shouldn’t have the news section in there.Any ideas?
March 2, 2018 at 4:55 pm #920429Hi,
Try adding this php code in functions.php to remove the News page (page selected as the blog page):
add_action('after_setup_theme','avia_remove_blog_breadcrumb', 90); function avia_remove_blog_breadcrumb(){ remove_filter('avia_breadcrumbs_trail','avia_modify_breadcrumb'); }
Hope this helps :)
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.