If-Menu Seems to Have Stopped Working
-
I built a website for a client that has two distinct areas of the site. Each “side” of the side needs its own menu of pages within that part of the site. If-menu was just the thing and has been working fine to show one menu for each side. That is until a day or two ago. It may have been until yesterday when I made a simple change to the menu by deleting one item. However, nothing about my custom conditions changed on the remaining menu. But now the site is showing the same menu on both of the sections of the site. Last year, I added the following to the theme’s functions.php file, based on an internet article. And it has worked just fine until now. What happened? Why won’t it work anymore? This is a critical issue for the site in question.
?????
add_filter( ‘if_menu_conditions’, ‘wpb_new_menu_conditions’ );function wpb_new_menu_conditions( $conditions ) {
$conditions[] = array(
‘name’ => ‘Is a Get Help Page’, // name of the condition
‘condition’ => function($item) { // callback – must return TRUE or FALSE
return is_page( array( 77, 196, 224, 372, 382, 389 ) );
}
);return $conditions;
}
?????The page I need help with: [log in to see the link]
- The topic ‘If-Menu Seems to Have Stopped Working’ is closed to new replies.