Managing Multiple Menus with Same Menu Item Names
-
I absolute love this plugin. I’m using it on a website wherein there are 4 similar restaurants, each with their own menus. The plugin has a few shortcomings on making this manageable — and I found solutions. However, I’d love if these solutions could be future features, not just my hacks.
IDENTIFYING WHICH SECTION BELONGS TO WHICH MENU.
If we have the same sections in multiple menus, this is confusing to administrate. We have the ‘Note’ field wherein we can write the Menu Name. I’ve used the plug ‘Admin Columns’ to make this display when browsing menu sections. I installed it, selected Menu Sections, added ‘Note’ as a ‘Custom Field’ and selected ‘_fl_menu_section_note’. Done.Request: Add the ability to show column ‘NOTE’ in Menu Sections admin.
Request: Create a way to arbitrarily link a section to a menu. The ‘Types’ Plugin has this sort of functionality. Show this relationship in parenthesis after the name whenever the name appears in the admin.IDENTIFYING WHICH RESTAURANT THE FOOD BELONGS TO
Once again, multiple restaurants may serve… french fries. We can use Menu Tags to identify which restaurant an item belongs in and this shows up nicely in the admin. However, when adding items to a section, we cannot tell which ‘French Fries’ we are adding — they might all have different prices.So I’ve hacked the plugin to show the respective TAG in parenthesis when results appear in the AJAX populated ‘Menu Items’ box.
My edits are below:
/lib/Foodlist/Project/Wordpress/Plugin/Foodlist/Admin/Metabox/MenuSection/ItemsMetabox.php
:100 +
$terms = wp_get_post_terms( $postId, ‘fl-menu-tag’, array(“fields” => “names”));
$terms = implode(‘, ‘, $terms);
$title = get_the_title($postId) . ‘ (‘ . $terms . ‘)’;/lib/Foodlist/Project/Wordpress/Plugin/Foodlist/Admin/Ajax/Manager/Base.php
:105 +
if ($type == ‘fl-menu-item’) {
$terms = wp_get_post_terms( $post->ID, ‘fl-menu-tag’, array(“fields” => “names”));
$terms = implode(‘, ‘, $terms);
$note = $terms;
}
else {
$note = get_post_meta($post->ID, ‘_fl_menu_section_note’, true);
}
$result[] = array(
‘id’ => $post->ID,
‘text’ => get_the_title($post),
‘note’ => $note
);
- The topic ‘Managing Multiple Menus with Same Menu Item Names’ is closed to new replies.