delete a page from a breadcrumb trail

Based on the code your used my guess is it would be as simple as adding a unset($bcarray[0]); to their code on line 15. Here is the code in it’s entirety: function write_breadcrumb() { $pid = $post->ID; $trail = “<a href=”https://wordpress.stackexchange.com/”>Home</a>”; if (is_front_page()) : // do nothing elseif (is_page()) : $bcarray = array(); $pdata = … Read more

Get menu names and same depth level menu names

Sorry, this is a little vague but it should get you started. It seems like you need to: Check if the page has a parent <?php if($post->post_parent) ?> Something like <?php echo $post->post_parent; ?> Something like <a href=”https://wordpress.stackexchange.com/questions/113592/<?php the_permalink() ?>”><?php the_title(); ?></a> Something like the code below, then apply your solution for turning it into … Read more

Show only one level in breadcrumbs

You can use wp_get_post_parent_id to return just the parent ID of the page in question. Then you can use get_the_title and get_permalink with that parent ID to build a back button to the parent page; <?php if( $parent = wp_get_post_parent_id( get_the_ID() ) ): ?> <a href=”https://wordpress.stackexchange.com/questions/167269/<?php echo get_permalink($parent); ?>”><?php echo get_the_title($parent); ?></a> <?php endif; ?> … Read more

Customising Breadcrumb NavXT [closed]

For option a, see the Breadcrumb NavXT FAQ. For option b, since there isn’t an all encompassing “current item breadcrumb template”, you have two options: Since all the unlinked breadcrumb templates are used for the current item, just replace the %title% and %htitle% tags with ‘You are here’. Write a filter for the bcn_breadcrumb_title hook, … Read more

how to add custom breadcrumbs in wordpress?

We’ve created a custom function called get_breadcrumb() to generate the breadcrumb links. You only need to add the get_breadcrumb() function code in functions.php file of the current theme. function get_breadcrumb() { echo ‘<a href=”‘.home_url().'” rel=”nofollow”>Home</a>’; if (is_category() || is_single()) { echo “&nbsp;&nbsp;&#187;&nbsp;&nbsp;”; the_category(‘ &bull; ‘); if (is_single()) { echo ” &nbsp;&nbsp;&#187;&nbsp;&nbsp; “; the_title(); } } … Read more