- This topic has 3 replies, 2 voices, and was last updated 6 years, 8 months ago by J. Davis.
- March 24, 2017 at 5:27 pm #496549Massimo CinquiniGuest
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
Massimo CinquiniMarch 27, 2017 at 2:54 pm #497375J. DavisKeymaster
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.
JohnMarch 27, 2017 at 3:48 pm #497433Massimo CinquiniGuest
Thank you very much John.
MassimoMarch 29, 2017 at 3:14 pm #498607
- You must be logged in to reply to this topic.