Modifying the Five Star Restaurant Menu Plugin Using Templates

The template system that exists in the Five Star Restaurant Menu WordPress plugin opens a whole new level of customization for those comfortable working with a bit of code.

Everything that displays on the front end of the plugin can be customized by creating your own template files (to modify and/or overwrite the existing templates files). In this post we’ll go over how you can do this.

To get started, you should have FTP access to your server, so that you can download and upload files to your WordPress installation. Navigate to the templates folder for the plugin, which can be found by going to wp-content > plugins > food-and-drink-menu > fdm-templates.

In this example, we’re going to rearrange the menu section so the description appears at the bottom of the section instead of at the top. Here’s what a section looks like normally:

In order to achieve this, we’ll need to modify the menu-section template. Download that template and open it up in your code editor. It should look like this:

If you’ve worked with theme templates before, this will probably look familiar. It conditionally loads the different elements of the menu section and creates a list element to include them in. We’ll move the condition that loads the description below where it prints the rest of the items and place the description in its own list element. The code for this will look like:

And, on the front end, the menu section will now look like:

Touch up with CSS

You may feel that the description looks a little out of character now that it’s down there. You can do a slight modification to the CSS to help with this. For example:

.fdm-section li:last-of-type {
  font-style: italic;
  padding: 10px;
  background: #eee;
}
.fdm-section li:last-of-type p {
  margin-bottom: 0;
}

After this CSS has been loaded, it should look like the following:

That’s all there is to it. You can do the same thing to modify any other aspect of the front end of the plugin.

Check back next week for the first post in our Features series about our Five Star Business Profile and Schema plugin!

Call to action box goes here
Need a Plugin to Improve Your Site?
Browse Plugins Now
🍽️ How to Manage Restaurant Bookings from Your Phone or Tablet Using the Five Star Restaurant Manager App
🍽️ How to Manage Restaurant Bookings from Your Phone or Tablet Using the Five Star Restaurant Manager App

Managing restaurant reservations is one of the most time-sensitive parts of running a busy service. This week, we are highlighting an update that makes this even easier: the newest enhancements to the Five Star Restaurant Manager mobile app, now featuring colour-coded booking statuses for instant clarity at a glance. If you use our Restaurant Reservations…

🎉New Year, New Affiliate Website: How AFFI.AI Can Transform Your Content
🎉New Year, New Affiliate Website: How AFFI.AI Can Transform Your Content

The new year is the perfect time to rethink how your website earns revenue. If you run or plan to start an affiliate website, AFFI.AI, a sister company of Five Star Plugins, can help you transform your content into a revenue-generating engine. Visually Engaging Affiliate LinksInstead of relying on plain text links, AFFI.AI allows you…

🧠The Pros and Cons of Using Caching on Your WordPress Site
🧠The Pros and Cons of Using Caching on Your WordPress Site

Caching is one of the most effective tools to speed up your WordPress site, but it’s also one of the easiest to misconfigure. When used wisely, caching can dramatically improve your site’s load times, reduce server load, and create a better customer experience — especially during high-traffic periods like the holidays. However, if your site…

Discover More Posts
Browse Plugins Now