OK, I need the permalink of menu items, as each item will display their information independently on a single page, then wanted to know how can get the slug of the items or the permanent link to the template “foodlist_menu_item_template”, i’m using a filter like this:
function tm_menu_item_template( $tpl ) {
if ( is_page_template( 'template-menu.php' ) ) {
$tpl = '
<div class="fl-menu-item" id="fl-menu-item-[menu_item_id]-[menu_item_instance]">
[menu_item_thumbnail]
<h2>[menu_item_title]</h2>
<div class="item-overlay">
<div class="item-inner">
<a id="fl-menu-item-url-[menu_item_id]" href="#_i_need_permalink_here">[menu_item_thumbnail]</a>
<h2>[menu_item_title]</h2>
<div class="fl-excerpt">
[menu_item_excerpt]
</div>
<a id="fl-menu-item-url-h2-[menu_item_id]" class="menu-item-button" href="#_i_need_permalink_here">View More</a>
</div>
</div>
</div>
';
}
return $tpl;
}
add_filter( 'foodlist_menu_item_template', 'tm_menu_item_template', 10, 2 );
See #_i_need_permalink_here.