Basically I'm customizing the menu through the options of wp_nav_menu().
Here is some of my code:
function custom_novice_menu($args) {
$args['container'] = false;
$args['container_id'] = 'my_primary_menu';
$args['link_before'] = '<div class="topic-card"><div class="topic-circle"></div><span></span><h3>';
$args['link_after'] = '</h3></div>';
return $args;
}
Essentially I want to get the name or ID of the current menu item. That way I can use custom fields for each menu item, but I'm not sure how to get the current item doing this.
This is a filter
in the functions.php
file.
I basically want $item->name
or something like that I'm assuming.