Add spicy icons(like peppers)

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #500950
    Stelios
    Guest

    Is there any way to add an icon for example one pepper for spicy menu items and two peppers for very hot and spicy ?

    Or is there any workaround using tags and css ?

    #501488
    Stelios
    Guest

    Hi there, please ignore my question..just noticed that tag slugs are added as classes so i can add the spicy levels as tags and use css to add an icon.

    #502315
    J. Davis
    Keymaster

    Hello Stelios,

    Thank you for your notification. Contact us if you have any additional questions.

    Best regards,
    John

    #565374
    zenzino
    Guest

    @Stelios

    Can you share how you did that?

    I used:

    a.mprm-tag-gluten-free {
        text-indent: -9999px;
        background: url (http://dailydosegrill.zenzino.design/wp-content/uploads/2017/08/gluten-free.png) no-repeat;
        height: 24px;
    }

    And it didn’t work. Having an icon instead of the tags would be very helpful so I appreciate any solution you could share.

    Thanks.

    #565512
    J. Davis
    Keymaster

    Hi Zenzio,

    You can try adding image or icons for certain tag. For example I’ve added tag and called it ‘fish’. It’s class name is .mprm-tag-fish. Thus I go to Appearance>Customize>Additional CSS and add the style below to transform the text into image or icon:

    a.mprm-tag-fish{
    content:url("wp-content/uploads/fish.jpg");
    height:30px;
    }

    Best regards,
    John

    #565574
    zenzino
    Guest

    Hi John,

    It worked like a charm. Thank you very much for your help.

    One last question (hopefully): Is there a way to remove the comma between the tags when I use multiple tags?

    Thanks,
    Don

    #566280
    J. Davis
    Keymaster

    Hi Don,

    You need to override templates of plugin to edit the output of tags. Try to follow the steps below:
    1. go to your server – /wp-content/plugins/mp-restaurant-menu/templates/common and copy item-tags.php file
    2. go to /wp-content/themes/your_theme_folder and create /mp-restaurant-menu/common folder and paste the file you copied.
    3. open the file to edit and find the line below
    echo implode(", ", $tags_array); ?>
    4. put “\n” instead of “, “ in this line and save the changes.
    Go to preview the page with your menu items.

    Best regards,
    John

    • This reply was modified 7 years, 2 months ago by J. Davis.
    #566748
    zenzino
    Guest

    Perfect.

    Thanks for all your help.

    #566790
    J. Davis
    Keymaster

    Hi,

    You are welcome. We’d appreciate if you rate and leave a review for our Restaurant Menu plugin. Thank you for your interest.

    best regards,
    John

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