Hey,
I have a problem with breadcrumbs on archive.php page. The last breadcrumb it displays is a last post. It should only display name of archive. Should loop be formated somewhat different?
Attaching screenshots:
Thanks for reading!
Hey,
I have a problem with breadcrumbs on archive.php page. The last breadcrumb it displays is a last post. It should only display name of archive. Should loop be formated somewhat different?
Attaching screenshots:
Thanks for reading!
Hello, a quick fix for this is to add an if statement to the element that has the breadcrumb to show only if not the archive page and then in the else element below it output a hand written breadcrumb for the archive page.
I followed logic from jonroc. It worked for me. I added PHP code action on breadcrumb elements and pasted this code:
β¦ without PHP tags!
You just have to add IF statment before the rest of the code. You must write it out. I found it worked best if I use PHP code action.
I changed the PG_Helper::getBreadcrumbs function so that it only adds the current post if is_singular() is true.
Note, when this is out in the next release, your custom code wonβt work correctly, because it will remove the category from the returned array.
Thank you!
Will have that in mind.