Restaurant

From IThemes Codex
(Difference between revisions)
Jump to: navigation, search
(How to get Menu listing page and course archive pages to look like in BuilderChild-Entree)
(See also)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
[http://ithemes.com/forum/forum/94-builder-block-restaurant/ Support Forum for Builder Block Restaurant]
+
'''Builder Restaurant Block''' adds a number of features to your Builder site that turn it into an easy-to-use restaurant site.
  
=How to set up=
+
'''[http://ithemes.com/purchase/entree/ Builder Child Child - Entreé]''' and '''[http://ithemes.com/purchase/entree-pub/ Builder Child - Entreé Pub]''' are designed to work specifically with the Builder Restaurant Block by providing matching page templates for '''Menu Items''' and '''Locations'''.
  
# Download the Restaurant block plugin from [http://ithemes.com/member/downloads/plugins/builder-block-restaurant/builder-block-restaurant.zip here].
 
# Download the corresponding theme (either Entree or Entree Pub) from [http://ithemes.com/member/member.php Member Panel].
 
  
=How to enable commenting in single Location entry pages=
+
=Installation=
  
'''1.''' Ensure that the latest version of Builder Blocks plugin is being used. See [http://ithemes.com/codex/page/General_WordPress_Related#How_to_update_a_plugin this] to learn how to properly update plugins.
+
# Download the Restaurant Block plugin from [http://ithemes.com/member/login.php iThemes Member Panel].
 +
# From the WordPress dashboard, navigate to '''Plugins > Add New'''.
 +
# Install and Activate the '''builder-block-restaurant''' zip file.
  
'''2a.''' Preferred: Add the following code to your child themes functions.php file
+
<br />
  
<pre class="brush:php;">
+
Once Builder Restaurant Block has been installed, you'll notice two new menus have been added to the left-hand navigation of your WordPress dashboard:
function add_comments_to_location() {
+
    add_post_type_support( 'restaurant_location', 'comments' );
+
}
+
  
add_action('init', 'add_comments_to_location');
+
* '''Menu Items''' - Add menu items with a title, text, price, featured image and apply a course type or allergy
</pre>
+
* '''Locations''' - Add restaurant location(s) with a title, text, address (and map), featured image, features, cuisines, hours and contact details.
  
'''2b.''' Alternatively, if 2a fails: edit wp-content/plugins/builder-block-restaurant/lib/post-types/2.location.php.
+
<br />
+
<u>Note</u>: Plugin customizations will be erased during plugin upgrades. So remember to re-do this when you update the plugin.
+
  
Change
+
[[File:Restaurant-block-dashboard.png|800px|link=]]
  
<pre class="brush:php;">
+
=Menu Items=
    'supports'    => array( 'title', 'editor', 'thumbnail', 'excerpt' ),
+
</pre>
+
  
to
+
Builder Restaurant Block creates a custom post type for '''Menu Items''' displayed in a menu "archive" visible on the [http://demos.ithemes.com/entree/menu/ Entreé Demo Site].
<pre class="brush:php;">
+
    'supports'   => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
+
</pre>
+
  
 +
<br />
  
'''3.''' Edit wp-content/themes/BuilderChild-Entree/restaurant-location/single.php.
+
[[File:Menu-items.png|800px|link=]]
  
Change
+
<br />
  
<pre class="brush:php;">
+
==The Menu Items Menu==
    <?php //comments_template(); // include comments template ?>
+
</pre>
+
  
to
+
<br />
  
<pre class="brush:php;">
+
[[file:Builder-Restaurant-block-menu.png|800px|link=]]
    <?php comments_template(); // include comments template ?>
+
</pre>
+
  
'''4.''' Go to My Theme -> Settings -> Comments. Place a tick mark for ''Locations'' and Save Settings.
+
<br />
 +
 
 +
The '''Menu Items''' menu expands to reveal several pages:
 +
 
 +
*'''All Menu Items''' - A listing of all menu "posts"
 +
*'''Add New''' - The "Add New Menu Item" page
 +
*'''Courses''' - A listing of course types, including by default appetizers, desserts, drinks, entrees, salads, sides and soups. You can also add custom course categories.
 +
*'''Allergies''' - A listing of allergy types, including by default dairy, eggs, peanuts, rice, seafood, shellfish, soy, tree nuts and wheat. You can also add custom course categories.
  
= How to get Menu listing page and course archive pages to look like in BuilderChild-Entree =
 
  
When a Builder child theme other than BuilderChild-Entree is active, it is possible to get the Menu listing page and course archive pages to look like in Entree. For the sake of this tutorial, we are going to use BuilderChild-Default as our active theme and http://localhost/builder3 as the site URL.
+
==Adding a New Menu Item==
  
We added 2 menu items in "Appetizers" course and 1 menu item in "Sides". When we http://localhost/builder3/menu/, it looks like:
+
To add a new menu item, click '''Add New'''. Add the menu item title, a description, price (using the "$"), a featured image and apply course and allergy tags.
  
 
<br />
 
<br />
  
[[File:Menu-Items-My-Test-Site-2011-11-28-11-27-01.png|490px|thumb|none]]
+
[[File:Add-new-menu-item.png|800px|link=]]
  
 
<br />
 
<br />
  
This Menu listing page uses active theme's ''archive.php''.
+
Press '''Publish'''. Your new Menu Item will now be visible on the site from the URL located beneath the Menu Item Title.
  
Copy the following from BuilderChild-Entree theme directory into BuilderChild-Default directory:
+
<br />
  
* template-menu-item-listing.php
+
===Courses===
* loop-menu-item-archive.php
+
* restaurant-menu-item directory
+
* images/bg.jpg (optional - If you want to apply Entree theme's body background image)
+
* images/date-bg.png
+
* images/price-ribbon-right.png
+
  
Create a blank Page titled "Menu" and select "Menu Item Listing" as its Template.
+
The '''Courses''' page in the Menu Items Menu lists available course taxonomies that can be applied to menu items. Default courses include appetizers, desserts, drinks, entrees, salads, sides and soups. You can customize the courses by adding new allergies or removing the defaults.
  
Now when we refresh http://localhost/builder3/menu/, it is going to look like
+
<br />
  
[[File:Menu-Items-My-Test-Site-2011-11-28-11-34-28.jpg|243px|thumb|none]]
+
[[File:courses.png|800px|link=]]
  
After adding [http://d.pr/JJ6X this] CSS code at the end of BuilderChild-Default's style.css, http://localhost/builder3/menu/ is going to look like
+
<br />
  
[[File:Menu-Items-My-Test-Site-2011-11-28-11-43-55.jpg|304px|thumb|none]]
+
===Allergies===
  
When we click on the hyperlink for any course, let's say "Appetizers", it takes us to http://localhost/builder3/course/appetizers/. This is the taxonomy term page.
+
The '''Allergies''' page lists available allergy taxonomies that can be applied to menu items. Default allergies include dairy, eggs, peanuts, rice, seafood, shellfish, soy, tree nuts and wheat. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.
  
It is going to look like
+
<br />
  
[[File:Appetizers-My-Test-Site-2011-11-28-12-32-12.png|708px|thumb|none]]
+
[[File:allergies.png|800px|link=]]
  
This taxonomy term archive page also uses active theme's ''archive.php'' by default.
+
<br />
  
Copy BuilderChild-Entree/restaurant-course to BuilderChild-Default directory and then it will look like.
+
==Applying the Menu Item Listing Page Template==
  
[[File:Appetizers-My-Test-Site-2011-11-28-12-34-59.jpg|457px|thumb|none]]
+
'''[http://ithemes.com/purchase/entree/ Builder Child Child - Entreé]''' and '''[http://ithemes.com/purchase/entree-pub/ Builder Child - Entreé Pub]''' are designed to work specifically with the Builder Restaurant Block by providing matching page templates for '''Menu Items''' and '''Locations'''.
  
That's it!
 
  
= How to show Course description on Course Term archive pages =
+
Add a new page for '''Menu''' (or any page title) and select the '''Menu Item Listing''' template in the Page Attributes section.
  
[[File:Edit Course ‹ Builder Responsive Test Site — WordPress 2013-02-24 21-18-48.png|800px|thumb|none]]
+
<br />
  
[[File:Appetizers-Builder-Responsive-Test-Site-2013-02-24-21-19-14.jpg|800px|thumb|none]]
+
[[File:Menu-Listing.png|800px|link=]]
  
If you would like to show description on Course Term archive pages like http://sitename.com/course/appetizers/, follow this:
+
<br />
  
Edit wp-content/themes/BuilderChild-Entree/restaurant-course/archive.php or wp-content/themes/BuilderChild-Entree-Pub/restaurant-course/archive.php (depending on whichever is the active theme)
+
Applying this page template will render the styled archive view of all menu items on that page.
  
Below
 
  
<pre class="brush: php; gutter: false;">
+
'''Note:''' Only '''[http://ithemes.com/purchase/entree/ Builder Child Child - Entreé]''' and '''[http://ithemes.com/purchase/entree-pub/ Builder Child - Entreé Pub]''' provide the '''Menu Item Listing''' page templates for use with Builder Restaurant Block.
<h4 class="loop-title">
+
<?php
+
the_post();
+
  
$title = builder_get_tax_term_title();
+
=Locations=
  
if ( is_paged() )
+
Builder Restaurant Block creates a custom post type for '''Locations''' displayed in a "location" archive visible on the [http://demos.ithemes.com/entree/locations/ Entreé Demo Site].
printf( '%s &ndash; Page %d', $title, get_query_var( 'paged' ) );
+
else
+
echo $title;
+
  
rewind_posts();
+
<br />
?>
+
</h4>
+
</pre>
+
  
add
+
[[File:Restaurant-block-locations.png|800px|link=]]
  
<pre class="brush: php; gutter: false;">
+
<br />
<h5 class="loop-description">
+
<?php
+
$terms = get_the_terms( $post->ID, 'restaurant_course' );
+
  
foreach ($terms as $term) {
+
==The Locations Menu==
  echo $term->description;
+
}
+
?>
+
</h5>
+
</pre>
+
  
Then add the following at the end of child theme's style.css (WP dashboard -> Appearance -> Editor):
+
<br />
  
<pre class="brush: css; gutter: false;">
+
[[File:Locations-menu.png|800px|link=]]
.loop-description {
+
 
    font-size: 1.5em;
+
<br />
    margin-bottom: 0.5em;
+
 
    margin-left: 0.3em;
+
The '''Locations''' menu expands to reveal several pages:
}
+
 
</pre>
+
*'''All Locations''' - A listing of all location"posts"
 +
*'''Add New''' - The "Add Location" page
 +
*'''Features''' - A listing of location feature types, including by default breakfast, brunch, buffet, business casual, carry out, casual, dancing, delivery, dinner, family friendly, fine dining, etc.
 +
*'''Cuisine''' - A listing of location cuisine types, including American, Asian, Bagels, Bakery, Barbecue, Burgers, Cajun, etc.)
 +
 
 +
==Adding a New Location==
 +
 
 +
To add a new location, click '''Add New'''. Add the location title, text, address (and map), featured image, features, cuisines, hours and contact details.
 +
 
 +
<br />
 +
 
 +
[[File:Add-new-location.png|800px|link=]]
 +
 
 +
<br />
 +
 
 +
Press '''Publish'''. Your new location will now be visible on the site from the URL located beneath the Location Title.
 +
 
 +
<br />
 +
 
 +
===Features===
 +
 
 +
The '''Features''' page lists available feature taxonomies that can be applied to locations. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.
 +
 
 +
<br />
 +
 
 +
[[File:Features.png|800px|link=]]
 +
 
 +
<br />
 +
 
 +
===Cuisine===
 +
 
 +
The '''Cuisine''' page lists available feature taxonomies that can be applied to locations. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.
 +
 
 +
<br />
 +
 
 +
[[File:Locations.png|800px|link=]]
 +
 
 +
<br />
 +
 
 +
=Customization Examples=
 +
*[[Builder_Blocks:_Restaurant_-_Example_Customizations#Setting_up_the_menu_listing_page_and_course_archive_pages_like_the_Builder_Child-Entree_demo|Setting up the menu listing page and course archive pages like the Builder Child-Entree demo]]
 +
*[[Builder_Blocks:_Restaurant_-_Example_Customizations#Enabling_commenting_in_single_location_entry_pages|Enabling commenting in single location entry pages]]
 +
*[[Builder_Blocks:_Restaurant_-_Example_Customizations#Displaying_course_description_on_course_term_archive_pages|Displaying Course description on Course Term archive pages]]
 +
 
 +
=Additional Links=
 +
 
 +
*[http://ithemes.com/forum/forum/94-builder-block-restaurant/ Support Forum for Builder Block Restaurant]
 +
 
 +
 
 +
<br />
 +
[[:Builder|← Back to Builder Codex Home]]

Latest revision as of 15:27, July 26, 2013

Builder Restaurant Block adds a number of features to your Builder site that turn it into an easy-to-use restaurant site.

Builder Child Child - Entreé and Builder Child - Entreé Pub are designed to work specifically with the Builder Restaurant Block by providing matching page templates for Menu Items and Locations.


Contents

Installation

  1. Download the Restaurant Block plugin from iThemes Member Panel.
  2. From the WordPress dashboard, navigate to Plugins > Add New.
  3. Install and Activate the builder-block-restaurant zip file.


Once Builder Restaurant Block has been installed, you'll notice two new menus have been added to the left-hand navigation of your WordPress dashboard:

  • Menu Items - Add menu items with a title, text, price, featured image and apply a course type or allergy
  • Locations - Add restaurant location(s) with a title, text, address (and map), featured image, features, cuisines, hours and contact details.


Restaurant-block-dashboard.png

Menu Items

Builder Restaurant Block creates a custom post type for Menu Items displayed in a menu "archive" visible on the Entreé Demo Site.


Menu-items.png


The Menu Items Menu


Builder-Restaurant-block-menu.png


The Menu Items menu expands to reveal several pages:

  • All Menu Items - A listing of all menu "posts"
  • Add New - The "Add New Menu Item" page
  • Courses - A listing of course types, including by default appetizers, desserts, drinks, entrees, salads, sides and soups. You can also add custom course categories.
  • Allergies - A listing of allergy types, including by default dairy, eggs, peanuts, rice, seafood, shellfish, soy, tree nuts and wheat. You can also add custom course categories.


Adding a New Menu Item

To add a new menu item, click Add New. Add the menu item title, a description, price (using the "$"), a featured image and apply course and allergy tags.


Add-new-menu-item.png


Press Publish. Your new Menu Item will now be visible on the site from the URL located beneath the Menu Item Title.


Courses

The Courses page in the Menu Items Menu lists available course taxonomies that can be applied to menu items. Default courses include appetizers, desserts, drinks, entrees, salads, sides and soups. You can customize the courses by adding new allergies or removing the defaults.


Courses.png


Allergies

The Allergies page lists available allergy taxonomies that can be applied to menu items. Default allergies include dairy, eggs, peanuts, rice, seafood, shellfish, soy, tree nuts and wheat. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.


Allergies.png


Applying the Menu Item Listing Page Template

Builder Child Child - Entreé and Builder Child - Entreé Pub are designed to work specifically with the Builder Restaurant Block by providing matching page templates for Menu Items and Locations.


Add a new page for Menu (or any page title) and select the Menu Item Listing template in the Page Attributes section.


Menu-Listing.png


Applying this page template will render the styled archive view of all menu items on that page.


Note: Only Builder Child Child - Entreé and Builder Child - Entreé Pub provide the Menu Item Listing page templates for use with Builder Restaurant Block.

Locations

Builder Restaurant Block creates a custom post type for Locations displayed in a "location" archive visible on the Entreé Demo Site.


Restaurant-block-locations.png


The Locations Menu


Locations-menu.png


The Locations menu expands to reveal several pages:

  • All Locations - A listing of all location"posts"
  • Add New - The "Add Location" page
  • Features - A listing of location feature types, including by default breakfast, brunch, buffet, business casual, carry out, casual, dancing, delivery, dinner, family friendly, fine dining, etc.
  • Cuisine - A listing of location cuisine types, including American, Asian, Bagels, Bakery, Barbecue, Burgers, Cajun, etc.)

Adding a New Location

To add a new location, click Add New. Add the location title, text, address (and map), featured image, features, cuisines, hours and contact details.


Add-new-location.png


Press Publish. Your new location will now be visible on the site from the URL located beneath the Location Title.


Features

The Features page lists available feature taxonomies that can be applied to locations. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.


Features.png


Cuisine

The Cuisine page lists available feature taxonomies that can be applied to locations. You can also add custom course categories. You can customize the allergy categories by adding new allergies or removing the defaults.


Locations.png


Customization Examples

Additional Links



← Back to Builder Codex Home

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox