Support » Plugin: Restaurant Menu by MotoPress » Displaying category description in show menu items view

  • Resolved tedhendershot

    (@tedhendershot)


    I see some similar topics in here but no definitive resolution–is there a way to display the description for the category in show menu items view? I’ve got a client asking for arbitrary text after a category (which seems like an incredibly common use case!) and there must be a way to do it. Any help?

    My shortcode: [mprm_items view=”grid” categ=”30,31″ tags_list=”” item_ids=”” col=”2″ categ_name=”without_img” show_attributes=”0″ feat_img=”0″ excerpt=”1″ price=”0″ categ_descr=”1″ desc_length=”999″ tags=”0″ ingredients=”0″ link_item=”0″]

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author MotoPress

    (@motopress)

    Hi @tedhendershot,

    By default there is no category description under the category title while listing menu items. However it is possible to override templates of plugin.
    For example you can copy

    \wp-content\plugins\mp-restaurant-menu\templates\common\item-taxonomy-header.php file
    to
    \wp-content\themes\your-theme-folder\mp-restaurant-menu\common\ folder. Then open to edit it with text editor and add the code I ‘ve placed below under the following line <div class="mprm-taxonomy-title"><?php echo $title ?></div>

    Code to place:

    <?php
    	if (!empty($mprm_view_args['categ_descr'])) {
    	   $desc_length = isset($mprm_view_args['desc_length']) ?  $mprm_view_args['desc_length'] : -1;
               $description = mprm_cut_str($desc_length, $mprm_term->description);
    	   if (!empty($description)) { ?>
    	       <p class="mprm-category-description">
    		         <?php echo $description; ?>
    		</p>
    	<?php }
     }
    ?>

    Then save changes and check go to preview it.

    Thank you! I appreciate the fix. Hope this helps someone else as well.

    Plugin Author MotoPress

    (@motopress)

    Hi @tedhendershot,
    You are welcome. We hope so and would be happy if you rate Restaurant Menu plugin. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Displaying category description in show menu items view’ is closed to new replies.