• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Removing current page + selector from breadcrumbs

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Removing current page + selector from breadcrumbs

This topic is: not resolved
  • This topic has 4 replies, 2 voices, and was last updated 8 years, 7 months ago by design_agency.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • October 26, 2017 at 4:50 pm #212997
    design_agency
    Member

    hiya—

    i thought this would be simple when i found bill erickson's post on removing the current page from breadcrumbs, however it's not working on my site for some reason.

    im working with cpt's but don't see anywhere in the code to add in my slugs (not that im terribly familiar with php). is there anything im overlooking?

    site password: beets

    thanks for any insight.

    https://dev.farmfreshri.org/programs/harvest-kitchen/cafe-corner-store/
    October 26, 2017 at 9:37 pm #212999
    carasmo
    Participant

    Bill's post works fine on single posts, but on CPTs, since they are created on init, you'd run it earlier, this is what I would do.

    //* first use a conditional to affect your cpt
    function your_prefix_remove_title_from_your_single_cpt_crumb( $crumb, $args ) {
      if ( is_singular( 'my-cpt-slug' ) ) :
      	return substr( $crumb, 0, strrpos( $crumb, $args['sep'] ) );
      endif;
    }
    
    add_action( 'after_setup_theme', 'your_prefix_run_filter_to_remove_your_single_cpt_title' );
    //* Run genesis_single_crumb earlier on the after_setup_theme hook
    function your_prefix_run_filter_to_remove_your_single_cpt_title() {
    	add_filter( 'genesis_single_crumb', 'your_prefix_remove_title_from_your_single_cpt_crumb', 10, 2 );
    }
    

    Genesis Theme Customization and Help

    October 26, 2017 at 9:38 pm #213001
    carasmo
    Participant

    Corrected.


    Genesis Theme Customization and Help

    October 29, 2017 at 1:43 pm #213012
    design_agency
    Member

    thanks for taking a look.

    after popping in your code (and modifying the cpt slug) im still getting the current page in the breadcrumb string. i then messed around with some other conditionals with the same result.

    as a test, i created a regular page and went back to bill's original bit of code. there too, it didnt work. i use dynamik website builder as a theme but otherwise a fairly modest development environment... anything come to mind that would prevent this code from working?

    thanks for your time.

    October 29, 2017 at 1:43 pm #213037
    design_agency
    Member

    thanks so much for taking a look!

    i popped in the code you suggested (changing the slugs of course) however am still seeing the current page title in my breadcrumbs. as a test, i went back to bill's original code and created a simple page. here too the current page title is showing up. is there any reason his code wouldnt be working on my site?

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble