• 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

How to position the breadcrumb under the title:

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 › How to position the breadcrumb under the title:

This topic is: resolved

Tagged: breadcrumb, Breakthrough Pro

  • This topic has 8 replies, 4 voices, and was last updated 4 years, 3 months ago by Brad Dalton.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • December 1, 2018 at 8:27 am #224757
    Superman
    Participant

    I would like to move the breadcrumb to the position under the title. FOr instance, under the title on this page: https://www.sambuno.com/people-review-your-website-where-it-matters/

    Screencast: https://www.useloom.com/share/75f1cb05d95741bb828139e1970ebe05

    Where would I place the code below within the functions.php file in order to get it to show where I want it to show.

    //* Reposition the breadcrumbs
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' );
    view raw

    Child Theme: breakthrough

    https://www.sambuno.com/people-review-your-website-where-it-matters/
    December 1, 2018 at 8:56 am #224758
    Victor Font
    Moderator

    The title is displayed within the WordPress loop. Breadcrumbs are meant to be displayed outside of the loop. You're going to have some challenges that you need to understand by moving the breadcrumbs into the loop.

    When you have an archive page or any page that displays multiple posts, the breadcrumbs will display after the title for every post. This will not look good. I think you should limit the display to single pages and posts only.

    This will do it for you:

    add_action('pre_get_posts', 'do_move_breadcrumbs');
    function do_move_breadcrumbs() {
    
        if ( is_single() || is_page() ) {
            //* Reposition the breadcrumbs
            remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
            add_action( 'genesis_before_entry_content', 'genesis_do_breadcrumbs' );
        }
    }

    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    December 1, 2018 at 6:04 pm #224764
    Superman
    Participant

    Victor thanks.

    I simply want to move show the breadcrumbs on the pages and posts and after pasting the code provided, there is no effect.

    Please advise.

    December 1, 2018 at 6:05 pm #224765
    Brad Dalton
    Participant

    Try this http://dreamwhisperdesigns.com/genesis-tutorials/reposition-genesis-breadcrumbs/


    Tutorials for StudioPress Themes.

    December 1, 2018 at 6:25 pm #224766
    Superman
    Participant

    The instruction is not clear. Though here is a screencast of what I am looking to accomplish with the breadcrumbs

    Screencast; https://www.useloom.com/share/5e53fb39498844fbbadd857221586a37

    December 1, 2018 at 6:59 pm #224767
    Anita
    Keymaster

    I posted a response in Facebook but wanted to share it here too.

    So the reason why it won't work is because the breadcrumb code is already included in the functions. Remove your code. Then look at Lines 211-213. You want to change line 213 to the preferred location.

    // Move breadcrumbs to below header.
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    add_action( 'genesis_after_header', 'genesis_do_breadcrumbs' );

    Change it to this:

    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs', 15 );

    Then adjust your CSS.

    Look through your functions file and you will see all of these things. Then if you want to move them around, install the Genesis Visual Hook Guide which will help you position things where you want them to go.


    Love coffee, chocolate and my Bella!

    December 1, 2018 at 8:57 pm #224770
    Brad Dalton
    Participant

    This code works for me when using the Genesis Sample theme.

    Breakthrough Pro already does this.


    Tutorials for StudioPress Themes.

    December 1, 2018 at 9:24 pm #224771
    Anita
    Keymaster

    Genesis Sample does not include the breadcrumb code in the child theme. It's pulling the breadcrumbs from the framework. Breakthrough Pro has included the breadcrumb code on lines 211-213. So adding a new function at the bottom the way he was doing it would not work because of the priority. That's why I suggested he remove his code and change it on Line 213.


    Love coffee, chocolate and my Bella!

    December 3, 2018 at 5:02 pm #224806
    Brad Dalton
    Participant

    Well done.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘How to position the breadcrumb under the title:’ is closed to new 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