Category Menus
-
I was so hopeful your plugin would work for me. I was trying to build something similar myself then came across your plugin. I found this plugin via your blog post. Anyways, my menu is based on categories. When viewing a specific post in a category the breadcrumbs aren’t being shown. I think this is because I don’t have the specific post linked within the menu (you mentioned this in your blog post). It fails because the URLs aren’t matching.
I think you could probably make this work by looking at the permalink settings. My permalink is set up for
/%category%/%postname%/
and my Category Base isarticles
.The URL for my post is
dev.local.com/travel/city-guides/vancouver
But your
is_at_url
function is testing it against this correct category url:
dev.local.com/articles/travel/city-guides
With a regex you could probably make these URLs give a positive match based on the permalink settings.
For example:
Based on the permalink you could strip off%postname%
from the post URL and prepend the Category Base. This would provide a match.
But I guess if/%category%/
isn’t part of the permalink settings, this wouldn’t work. Something to think about though!
- The topic ‘Category Menus’ is closed to new replies.