• Resolved Luizik

    (@luizaumnova)


    Hello!
    I created a rule to only for a category ‘kvartiri’ unfortunately it is not working, the item is not seen anywhere((

    add_filter( ‘if_menu_conditions’, ‘my_new_menu_conditions’ );

    function my_new_menu_conditions( $conditions ) {
    $conditions[] = array(
    ‘name’ => ‘Kvartiri’, // name of the condition
    ‘condition’ => function($item) { // callback – must return TRUE or FALSE
    return is_category( ‘kvartiri’ );
    }
    );

    return $conditions;
    }

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘A rule for a category’ is closed to new replies.