December 28, 2012 at 11:44 pm #8090
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 MurrayParticipantPost count: 575
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:
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.
You must be logged in to reply to this topic.