-
AuthorPosts
-
November 30, 2017 at 12:06 pm #883341
Hi, hopefully I’ll be able to explain this.
From my Home page I select Blog from the menu. – breadcrumbs are showing: Home/Blog – this is all OK
From my Blog page I then select a post – breadcrumbs are now showing: Home/Blog/Blog/Name of post – this is not OK, why are there two ‘Blog’s in the breadcrumbs?Also if I use the breadcrumbs to navigate backward Home/Blog/Blog/Name of post the first ‘Blog’ breadcrumb (moving right to left, ie backwards) takes me to a page which looks like my Blog page in layout form but isn’t – when I use Inspect Element the Head tag says it’s ‘Blog Archives – Blatantly London’
My actual Blog page has the Head tag of ‘Blog – Blatantly London’
I ‘t want to remove this ‘Blog Archives’ from my breadcrumbs so that it’s not a navigation option but don’t know where I do that in the theme.
Please can you help?
ThanksDecember 3, 2017 at 12:36 am #884214Hey tesspaine,
Try adding this code to the end of your functions.php file in Appearance > Editor:add_filter( 'avia_breadcrumbs_trail', 'remove_category_from_breadcrumb', 50, 2 ); function remove_category_from_breadcrumb( $trail, $args ) { if ( is_single() ) { unset ($trail[1]); unset ($trail[2]); } return $trail; }
Best regards,
MikeDecember 6, 2017 at 5:53 pm #885696Thanks Mike – I’ll try that an let you know.
December 7, 2017 at 10:28 am #886004Hi – I tried the above solution but got this message:
“Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.”
Does that mean I need to go to my C panel and add the code in the functions.php there?
Also, just to be sure, am I inserting this code after “require_once( ‘functions-enfold.php’);” which is the last piece of code on this form
Thanks.
Tess.
December 7, 2017 at 12:16 pm #886045Hi,
Yes that would be the right place, sounds like your error is from the new WP error checking function. Try making the change in cPanel, if you still have issues you can remove the code though cPanel afterward.Best regards,
MikeDecember 7, 2017 at 12:30 pm #886055OK Mike, will try through the Cpanel and see what happens – will post back the results!
Thanks.
Tess
December 8, 2017 at 12:48 am #886309 -
AuthorPosts
- You must be logged in to reply to this topic.