Getting breadcrumbs to play nice with rest of the blog
-
We are adding forums to an existing site rather than having a site that is 100% forums. I already have a breadcrumb set up for the main site but the forums don’t show up in them. Since the bbPress breadcrumb functions are significantly more complex than the simple breadcrumbs I currently use I decided to use bbPress’ crumbs in place of the main one. I have successfully modified the function to include category and single page data in the crumbs (without having “forums” as the base) but the blog root disappears. Help? Here’s what I added to ** Current Text **
// Category Page if (is_category() || is_single()) { the_category(' » '); if (is_single()) { echo " » "; the_title(); }
That omitted the blog root from the crumbs, so I tried this, which didn’t work either.
if (is_category() || is_single()) { $pre_current_text[] = '<a href="' . trailingslashit( home_url() ) . '">Front Row</a>' . the_category(' » '); if (is_single()) { echo " » "; the_title(); }
I’m not really sure what I’m doing here. I’m no function whiz.
- You must be logged in to reply to this topic.