From e67ead8cf0f0dac7880ea205804b8fefd97a7527 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 14 Aug 2015 10:38:10 -0400 Subject: [PATCH] add post type nav menu class filter --- navigation.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/navigation.php b/navigation.php index 0c18c40..caa4a0e 100644 --- a/navigation.php +++ b/navigation.php @@ -1,6 +1,28 @@ object_id == get_option('page_for_posts')){ + unset($classes[array_search('current_page_parent', $classjes)]); + } + + if(!is_search() && !is_404()){ + if(in_array("post-type-{$post_type}", $classes)){ + array_push($classes, 'current_page_parent'); + } + } + + return $classes; +} //EF + + class customize_wp_nav_menu { function __construct(){