WordPress custom breadcrumb function with custom link text and URLs
WordPress custom breadcrumb function with custom link text and URLs
WordPress custom breadcrumb function with custom link text and URLs
How to display all submenu items as a breadcrumb
Categories breadcrumb in a hierarchical order
If you’re dealing with the default “Category” taxonomy and the post post type, then you can get the post’s attached category terms with get_the_category(). $categories = has_category( $post ) ? get_the_category( $post ) : array(); The has_category() check is there just to fend off other post type posts. get_the_category() gives you an array of categories … Read more
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 plugin and add categories to the breadcrumbs.
how to put breadcrumb under Title [closed]
Stop breadcrumb function retrieving custom post type template name
You really shouldn’t be doing this. Functions belong in the functions file. Period. (Or perhaps in a separate functions file which you include in the main one) However, if you insist, you can drop functions in any template file you want, because PHP doesn’t care. Actually you will need to include it in every template … Read more
Try a breadcrumbs plugin. Breadcrumb NavXT is a popular option I believe. An alternative solution of is just printing the name of the current page. Here’s what such a function might look like in its most basic form: function wpse_87332_nav_identifier() { $page_name = get_the_title(); echo “You are here: ” . $page_name; } Note that this … Read more
Just grabbed a snippet from the get_cpt_crumb() function in the genesis breadcrumbs class file (/lib/classes/breadcrumb.php) protected function get_cpt_crumb() { $post_type = get_query_var( ‘post_type’ ); $post_type_object = get_post_type_object( $post_type ); if ( $cpt_archive_link = get_post_type_archive_link( $post_type ) ) $crumb = $this->get_breadcrumb_link( $cpt_archive_link, sprintf( __( ‘View all %s’, ‘genesis’ ), $post_type_object->labels->name ), $post_type_object->labels->name ); else $crumb = … Read more