Title: Breadcrumb shortcode remove current page
Last modified: December 7, 2023

---

# Breadcrumb shortcode remove current page

 *  Resolved [yann1ck](https://wordpress.org/support/users/ja4st3r/)
 * (@ja4st3r)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/breadcrumb-shortcode-remove-current-page/)
 * Hi Sybre,
 * thank you very much for the smooth update to verison 5.0. I updated two sites
   without any problem!
 * I have a very minor request: Is it possible to remove the current page from the
   breadcrumb trail? On my pages the breadcrumb trail is close to the page title,
   so it is duplicated information. I read in another support ticket that you plan
   improvements to the shortcode, but not sure if that is on your list.
 * All the best 
   Yannick

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/breadcrumb-shortcode-remove-current-page/#post-17265967)
 * Hi Yannick,
 * I’m glad everything went well!
 * I added your request to my list. Currently, it is only possible via filters. 
   Here’s one that I just created for this occasion:
 *     ```
       /**
        * Filters out TSF's last breadcrumb if at least 2 items are in the breadcrumb.
        * Only does this after wp_head to prevent affecting the structured data.
        * A better hook would've been <code>wp_body_open</code>, but not all themes have this yet.
        */
       add_action(
       	'wp_head',
       	function() {
       		add_filter(
       			'the_seo_framework_breadcrumb_list',
       			fn( $list ) => count( $list ) > 1 ? array_slice( $list, 0, -1 ) : $list,
       		);
       	},
       	PHP_INT_MAX,
       );
       ```
   
 * Here, you can learn where to put filters: [https://tsf.fyi/d/filters/#where](https://tsf.fyi/d/filters/#where).
 *  Thread Starter [yann1ck](https://wordpress.org/support/users/ja4st3r/)
 * (@ja4st3r)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/breadcrumb-shortcode-remove-current-page/#post-17295323)
 * Hi Sybre,
 * thank you very much for your response and your example. Why are you not using
   the “the_seo_framework_breadcrumb_shortcode_output” filter? Thats what I played
   with before going with a CSS only solution. Perhaps it is helpful for someone
   else.
 *     ```wp-block-code
       .tsf-breadcrumb .breadcrumb-item:not(:nth-child(-n + 2)):last-of-type {
           display:none;
       }
   
       .tsf-breadcrumb .breadcrumb-item:not(:nth-child(-n + 1)):nth-last-of-type(2)::after {
           display:none;
       }
       ```
   
 *  Plugin Author [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * (@cybr)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/breadcrumb-shortcode-remove-current-page/#post-17295360)
 * Hello Yannick!
 * It wasn’t apparent to me you wanted it removed from either the Schema.org output
   or the shortcode, so I created a filter that removed them both while mitigating
   the need for complicated CSS queries. But I’m glad you’ve found a workaround 
   🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Breadcrumb shortcode remove current page’ is closed to new replies.

 * ![](https://ps.w.org/autodescription/assets/icon.svg?rev=3000376)
 * [The SEO Framework – Fast, Automated, Effortless.](https://wordpress.org/plugins/autodescription/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autodescription/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autodescription/)
 * [Active Topics](https://wordpress.org/support/plugin/autodescription/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autodescription/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autodescription/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Sybre Waaijer](https://wordpress.org/support/users/cybr/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/breadcrumb-shortcode-remove-current-page/#post-17295360)
 * Status: resolved