• 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 page/post title 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 › General Discussion › Removing page/post title from breadcrumbs

This topic is: not resolved

Tagged: Balance, breadcrumb, breadcrumbs

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 6 months ago by Davinder Singh Kainth.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 14, 2014 at 12:41 pm #94889
    webmonkey
    Member

    I have been having a lot of problems trying to remove the redundant page/post title from the end of the breadcrumbs in the Balance theme.

    There's just no need for the title to appear there if there's a large page/post title already underneath. You can see this happening on the demo version of the theme:
    http://demo.studiopress.com/balance/mobile-communication/

    There are a variety of code snippets I've tried, including some promising Bill Erickson code, but it doesn't work:
    http://www.billerickson.net/code/remove-post-title-from-breadcrumb/

    Anyone have a clue?

    http://demo.studiopress.com/balance/mobile-communication/
    March 16, 2014 at 8:51 am #95136
    Davinder Singh Kainth
    Member

    1. Remove following code from functions.php file

    /** Customize breadcrumbs display */
    add_filter( 'genesis_breadcrumb_args', 'balance_breadcrumb_args' );
    function balance_breadcrumb_args( $args ) {
    	$args['home'] = 'Home';
    	$args['sep'] = ' ';
    	$args['list_sep'] = ', '; // Genesis 1.5 and later
    	$args['prefix'] = '<div class="breadcrumb"><div class="wrap">';
    	$args['suffix'] = '</div></div>';
    	$args['labels']['prefix'] = '<span class="home">You are here:</span>';
    	return $args;
    }
    

    2. Then add following code to functions.php file

    /**
     * Remove Post Title from Breadcrumb.
     * 
     * Takes a substring of crumb, starting at 0, with a length of up to the last occurrence of the 
     * (start of the) separator string.
     */
    function be_remove_title_from_single_crumb( $crumb, $args ) {
      return substr( $crumb, 0, strrpos( $crumb, $args['sep'] ) );
    }
    add_filter( 'genesis_single_crumb', 'be_remove_title_from_single_crumb', 10, 2 );

    3. Then make required changes in css for correct placement


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ 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

© 2023 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