• 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

Can't remove breadcrumbs via hook (HTML5)

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 › Can't remove breadcrumbs via hook (HTML5)

This topic is: not resolved

Tagged: breadcrumbs, hooks, html5

  • This topic has 1 reply, 1 voice, and was last updated 9 years, 7 months ago by Stefsull.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 18, 2014 at 6:01 pm #91036
    Stefsull
    Member

    I'm trying to reposition my breadcrumbs (to put them in a responsive wrapper beneath the header). I've got it working in that they're showing up in the new wrapper. What I can't figure out is why they're not being removed from the original position. (Yes, I have two sets!) Here's my code:

    //* Move the breadcrumbs up into their own parent holder
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    add_action( 'genesis_after_header', 'modified_genesis_do_breadcrumbs' );
    function modified_genesis_do_breadcrumbs() {
    	if ( is_page() )
    		return; // don't do breadcrumbs on pages ?>
    
    	<div class="breadcrumb__parent">
    	<?php genesis_breadcrumb();?>
    	</div>
    
    <?php }

    What happens is, I do achieve the breadcrumbs in the breadcrumb_parent... I do not achieve the remove_action. Thoughts on why this could be? (I'm using Genesis HTML5.) I can't give a URL because I'm working on

    February 18, 2014 at 6:59 pm #91046
    Stefsull
    Member

    As is sometimes the case, you work on something forever, finally ask a question — then figure it out yourself. I'm leaving the answer here for another lost soul (and my guess as to WHY this is the answer).

    Apparently, though the remove_action might work nicely when you're using the add_action to reposition them. But using it to remove them and replace them with a custom function doesn't — IF YOU'VE CHECKED THE BOX IN THE ADMIN DIRECTING IT WHERE TO PUT THE BREADCRUMBS. #facepalm Forgot that was there.

    I unchecked the admin box and magically, my second set of breadcrumbs disappeared.

  • 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