Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Restaurant Menu Change elements order in div mp_menu_item
- This topic has 3 replies, 2 voices, and was last updated 7 years, 8 months ago by J. Davis.
- AuthorPosts
- March 24, 2017 at 5:27 pm #496549Massimo CinquiniGuest
Good morning,
I wanted to know if there is a way to change the order of the elements (image, title, price, attributes etc …) contained within each individual product products displayed in a grid (with the shortcode [mprm_items] or a single category page or a single tag page)?
I can change the html/php of individual elements (image, title, price, attributes etc …), but do not understand what is the php file that decides the order in which they displayed in the div with class “mp_menu_item”.
I installed the plugin: Restaurant Menu Restaurant Menu + Cart + Restaurant Delivery Menu
Thank you
Massimo CinquiniMarch 27, 2017 at 2:54 pm #497375J. DavisKeymasterHello Massimo,
You can find the order of elements at /mp-restaurant-menu/classes/class-hooks.php file. In order to modify the order you need to edit the priority value. For example to place title above image you need to remove action with default priority and add it with new one. For example:remove_action('mprm_shortcode_menu_item_grid', 'mprm_menu_item_grid_title', 30); add_action ('mprm_shortcode_menu_item_grid', 'mprm_menu_item_grid_title', 10);
You can add this code to functions.php file of your theme.
Best regards,
JohnMarch 27, 2017 at 3:48 pm #497433Massimo CinquiniGuestThank you very much John.
Best regards,
MassimoMarch 29, 2017 at 3:14 pm #498607J. DavisKeymasterHi Massimo,
You are welcome. Check out other products at our website https://motopress.com , follow us at facebook and twitter.
Best regards,
John - AuthorPosts
- You must be logged in to reply to this topic.