7
votes
Yoast SEO breadcrumbs: how to create a filter that uses the url slug for breadcrumb titles
Yoast does have a filter for you to use. See here:
https://gist.github.com/jmcclellan/b2d97ffee0e924e28fa1
I used this to add "parent" pages to custom post types. We wanted to use pages as our ...
4
votes
Breadcrumbs with custom post type without plugin
Excellent!
Works the code of accepted answer (of Pieter Goosen).
Note: Just added a little task more. Make a validation check of that function before calling it, this way:
<?php
if(...
2
votes
How to Modify Breadcrumb Page Names for Specific Pages?
We generally don't answer plugin-specific questions here so you may find more help in a Yoast-specific forum. To point you toward the right direction, though, there is a filter called ...
2
votes
problem after update 4.9.6
This means that your theme isn't compatible with the new version of Wordpress. Here's what you can do:
You have to update your theme if an update is available.
You can go back to the old version of ...
2
votes
Accepted
How to obtain page breadcrumb based on menu structure only?
The wp_get_nav_menu_items function will give you an array of menu item objects for a given menu. These objects contain a mixture of data specific to that unique menu item, as well as the post/page/...
1
vote
Categories Not Showing in breadcrumbs in posts
Default Wordpress doesn't have any breadcrumbs.
My guess is that your breadcrumbs are added by the plugin Rank Math (which seems to be installed on your site). So just go to the settings for your ...
1
vote
is_shop, is_home, is_front_page doesn't work for woocommerce
For is_front_page() and is_home() condition:
Important: Please note that these functions work only once WordPress is loaded such as on template files or specific action hooks. You can’t just dump ...
1
vote
Accepted
Breadcrumbs on Product Page Always Show Wrong Product
The problem was a custom plugin I made was globally looping through some proucts with a WP_Query. This meant that the breadcrumbs were being set to the last product in that loop, not the product on ...
1
vote
Back button to previous page and breadcrumbs
For the button behavior,
If it's a one-off use case, you could add custom php conditional to check the referring url $_SERVER['HTTP_REFERER'] and current page/post ID or url. Then, either add a ...
1
vote
How to create a breadcrumb for pages?
There are a lot of plugins that offer a breadcrumb, but you can also create your own.
To create a simple breadcrumb, you'll need 2 functions. One to create a chain of categories, and one to generate ...
1
vote
Accepted
Direct link to post when multiple categories are selected
Install the Yoast SEO plugin to enable this:
1
vote
woocommerce breadcrumb only in cart and checkout pages
Actually you need to hook the breadcrumbs function to any hook which fires in cart and check pages. In the below case I called the function at the_dramatist_show_breadcrumbs which I have hooked to ...
1
vote
Accepted
Get the posttype of a taxonomy/term
On StackOverflow user indextwo suggests to do the following:
Use the get_taxonomy( $taxonomy-slug ) function which returns an object that contains all the associated post types. As suggested in the ...
1
vote
How-to get the get_category_parents() breadcrumbs trail without link on last item
Though a bit old thread, I have come out with this:
$catpars= get_category_parents($cat_id, true, ' » ');
$catpars= preg_replace('/\W\w+\s*(\W*)$/', '', $catpars);
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
breadcrumb × 112custom-post-types × 18
categories × 12
custom-taxonomy × 11
woocommerce-offtopic × 10
functions × 9
plugins × 8
php × 8
plugin-wp-seo-yoast × 8
menus × 7
navigation × 7
posts × 5
pages × 5
hierarchical × 5
permalinks × 4
title × 4
paths × 4
themes × 3
slug × 3
plugin-recommendation × 3
sub-menu × 3
plugin-development × 2
wp-query × 2
templates × 2
taxonomy × 2