Change elements order in div mp_menu_item

  • This topic has 3 replies, 2 voices, and was last updated 7 years ago by J. Davis.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #496549
    Massimo Cinquini
    Guest

    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 Cinquini

    #497375
    J. Davis
    Keymaster

    Hello 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,
    John

    #497433
    Massimo Cinquini
    Guest

    Thank you very much John.
    Best regards,
    Massimo

    #498607
    J. Davis
    Keymaster

    Hi Massimo,

    You are welcome. Check out other products at our website https://motopress.com , follow us at facebook and twitter.

    Best regards,
    John

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.