WP Restaurant Listings provide some shortcodes which you can insert into pages to display restaurants and restaurant submission form.
When using shortcodes, if the content looks blown up/spaced out/poorly styled, edit your page and above the visual editor click on the ‘text’ tab. Then remove any ‘pre’ or ‘code’ tags wrapping your shortcode.
To display list of restaurants, you can use
[restaurants] shortcode. By default, it will display filters to search restaurants by type, location etc.
Here is the list of available arguments this shortcode accepts:
per_page– Defaults to the ‘per page’ option in settings. This controls how many restaurants get listed per page.
orderby– Defaults to ‘featured’. Supports title, ID, name, date, modified, rand, featured.
order– Defaults to ‘desc’. Can be set to ‘asc’ or ‘desc’ to choose the sorting direction.
show_filters– Defaults to true. Shows filters above the restaurant list letting the user narrow the list by keyword, location, and restaurant type. Once a filter is chosen, active filters are listed above the restaurants, as is an ‘RSS’ link for the current search.
show_pagination– Defaults to false. Enable this to show numbered pagination instead of the ‘load more restaurants’ link.
show_categories– Defaults to true when categories are enabled. If enabled, the filters will also show a dropdown letting the user choose a restaurant category to filter by.
categories– Comma separate slugs to limit the restaurants to certain categories. This option overrides ‘show_categories’ if both are set.
restaurant_types– Comma separate slugs to limit the restaurants to certain restaurant types.
selected_restaurant_types– Comma separate slugs to select by default.
location– Enter a location keyword to search by default.
keywords– Enter a keyword to search by default.
featured– Set to true to show only featured restaurants, false to show no featured restaurants, or leave out entirely to show both (featured first).
The following example shows 5 recent restaurants per page without displaying the filters:
[restaurants per_page="5" show_filters="false"]
The following example shows 15 recent restaurants per page without displaying the categories:
[restaurants per_page="15" orderby="title" show_categories=false]
Use this shortcode to display a single restaurant by ID. To find the ID of the restautant go to Dashboard → Restaurants → All Restaurants and click on “Pencil” icon. You will find the ID in url.
Use this shortcode to display a single restaurant summary by ID. To find the ID of the restautant go to Dashboard → Restaurants → All Restaurants and click on “Pencil” icon. You will find the ID in url.
Submit Restaurant Form
Use this shortcode to display the frontend restaurant submission form. This shortcode doesn’t accept arguments, you can simply insert it into the page like the following example.
Use this shortcode to display the frontend restaurant dashboard for logged in users. This shortcode doesn’t accept arguments, you can simply insert it into the page like the following example.