jcs/item_url

Filter Example

Display the dynamic menu type on the end of the URL.

add_filter('jcs/item_url', 'jc_edit_item_url', 10, 3);
function jc_edit_item_url($url, $item_id, $item_type){
 
    if($item_type == 'term'){
        $url .= '#term';
    }elseif($item_type == 'page'){
        $url .= '#page';
    }else{
        $url .= "#$item_type";
    }
 
    return $url;
}