wp-bootstrap-navwalker icon indicating copy to clipboard operation
wp-bootstrap-navwalker copied to clipboard

Custom Post Types - Current-post-ancestor or Current-menu-parent ?

Open apsolut opened this issue 12 years ago • 10 comments

Planing to add Parent, Ancestor for CPT ?

examples: http://wordpressclean.wordpress.com/2014/03/24/add-custom-post-type-archive-to-page-nav-menus-php/ http://stackoverflow.com/questions/21020695/custom-set-current-menu-item-class-for-specific-pages-in-wp

apsolut avatar Apr 29 '14 15:04 apsolut

These classes should be automatically applied as the walker doesn't strip out standard WordPress classes. On Apr 29, 2014 11:06 AM, "Aleksandar Perisic" [email protected] wrote:

Planing to add Parent, Ancestor for CPT ?

— Reply to this email directly or view it on GitHubhttps://github.com/twittem/wp-bootstrap-navwalker/issues/107 .

SideQuestDIY avatar Apr 29 '14 15:04 SideQuestDIY

Kill me i think it was working with old version... i just started creating new site and no classes.. will check it again and get back with: what i did wrong.. ty :+1:

apsolut avatar Apr 29 '14 15:04 apsolut

Would be great if it could add active class to parent menu items as well.

jayarjo avatar Jul 01 '14 11:07 jayarjo

My problem was WooCommerce, i have Parent with Children categories, so when im on Single Product, it add active to Parent (current-cat and cat-parent) but not to that child category.. :+1:

apsolut avatar Jul 01 '14 12:07 apsolut

The issues with this is the way WooCommerce assigns categories. Because you can have more then one taxonomy assigned to a product and typically you do, WordPress doesn't know how to handle that.

SideQuestDIY avatar Sep 03 '14 18:09 SideQuestDIY

This should be re-opened as there is no native support to show custom post types single, and add the parent classes to the archive navigation menu item.

ghost avatar Apr 03 '19 13:04 ghost

These classes should be automatically applied as the walker doesn't strip out standard WordPress classes. On Apr 29, 2014 11:06 AM, "Aleksandar Perisic" [email protected] wrote:

Planing to add Parent, Ancestor for CPT ? — Reply to this email directly or view it on GitHubhttps://github.com//issues/107 .

No, it doesn't.

ghost avatar Apr 03 '19 13:04 ghost

@leecollings I'm happy to look at fixing this in an upcoming version of the walker but this specific issue thread is like 5 or 6 years old and about code which is really quite different to the current walker.

I would rather have a fresh issue opened about this if it is still a problem in the v4 walker.

pattonwebz avatar Apr 03 '19 14:04 pattonwebz

Fair enough, I'll try and gather more info/evidence, thanks for your reply.

ghost avatar Apr 03 '19 14:04 ghost

No need for father research, just open an issue with what you already know:)

I expect that it is still the case that this is handled the same as when this issue was opened - but afresh issue for tracking it would be good :)

pattonwebz avatar Apr 03 '19 14:04 pattonwebz