• 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

Agency – breadcrumbs issue

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 › Agency – breadcrumbs issue

This topic is: not resolved

Tagged: Agency, breadcrumbs, permalinks

  • This topic has 1 reply, 2 voices, and was last updated 10 years, 3 months ago by Bill Murray.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 28, 2012 at 11:44 pm #8090
    ckweb
    Member

    When I first set up Agency I tried to switch my homepage to static and assign my posts to my blog page under the reading settings, which I've done with many other sites.  That didn't work, and I think I now understand that the Agency child theme doesn't use a static page as a homepage, but the latest blog posts are also not shown on the homepage.  Instead, the homepage is populated with widgets, and the blog posts can be displayed on any page or even multiple pages by using the 'blog' template.

    So far I have gotten all that working, with my homepage looking good and my blog posts showing on my blog page, http://www.example.com/blog/, but one issue is still throwing me for a loop.  The blog posts themselves aren't nested under the blog page, WordPress still thinks the blog page is the site root, so my blog page is not included in the url path or the breadcrumb path for a blog post.  The url path I can deal with by making a custom permalink structure which includes /blog/ in the url structure.   However, the breadcrumbs function doesn't seem to recognize this, and I can't see how to insert a breadcrumb manually in the path.  Both the Genesis breadcrumbs and the Yoast breadcrumbs just seem to be looking for the parent hierarchy to generate the breadcrumbs, so when I view my new blog post, the breadcrumbs don't include they blog homepage, there is only the home link.

    It seems very basic that if you are reading a blog post you'd want to have a breadcrumb link back to the main blog page as well as the home page - so how can I get this?  Is there a way to manually stuff a breadcrumb into the path for all blog posts?  Or is there a way to set my blog page as the parent of all blog posts without breaking the Agency homepage template?

    I have mainly been developing this on a local machine, but since I know it helps to have a link to a live site, for the moment I have a test site up here:  http://ergonavar.com/dev/peak/

     

    December 29, 2012 at 12:41 am #8094
    Bill Murray
    Member

    Without looking in detail at your site, is your blog page a WP page that uses the blog template where you define in Genesis settings which categories you want to include in your blog page template?  The breadcrumb you want to include is the page, and I don't think Genesis includes that by default.  For that reason, I often just create a category of "Blog" and make my menu a link to that category archive.  If you don't want to do that, you could try these things, all of which are untested:

    1) Explore the Breadcrumb NavXT or Genesis Simple Breadcrumbs plugins; I'm not sure either will get you what you want, but when breadcrumb issues have come up before, these plugins get mentioned  because they provide more power/flexibility

    2) See what this code does in your child theme's functions.php:

    add_filter('genesis_single_crumb', 'test_add_blog_to_breadcrumb');
    add_filter('genesis_archive_crumb', '
    test_add_blog_to_breadcrumb');
    function test_add_blog_to_breadcrumb($crumb) {
    return '<a href="'.get_permalink(get_option( 'page_for_posts' )).'">'.get_the_title(get_option( 'page_for_posts' )).'</a> > '.$crumb;
    }

    I haven't tested that, so it might  not get you what you want.  Post back with the results and I will try to tweak it.


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

  • 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