Builder Blocks: Restaurant - Example Customizations

From iThemes Codex
Jump to: navigation, search

Setting up the menu listing page and course archive pages like the Builder Child-Entree demo

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.

We added 2 menu items in "Appetizers" course and 1 menu item in "Sides". When we http://localhost/builder3/menu/, it looks like:


This Menu listing page uses active theme's archive.php.

Copy the following from BuilderChild-Entree theme directory into BuilderChild-Default directory:

  • template-menu-item-listing.php
  • 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.

Now when we refresh http://localhost/builder3/menu/, it is going to look like


After adding this CSS code at the end of BuilderChild-Default's style.css, http://localhost/builder3/menu/ is going to look like


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.

It is going to look like


This taxonomy term archive page also uses active theme's archive.php by default.

Copy BuilderChild-Entree/restaurant-course to BuilderChild-Default directory and then it will look like.


Enabling commenting in single location entry pages

1. Ensure that the latest version of Builder Blocks plugin is being used. See this to learn how to properly update plugins.

2a. Preferred: Add the following code to your child themes functions.php file

function add_comments_to_location() {
    add_post_type_support( 'restaurant_location', 'comments' );

add_action('init', 'add_comments_to_location');

2b. Alternatively, if 2a fails: edit wp-content/plugins/builder-block-restaurant/lib/post-types/2.location.php.

Note: Plugin customizations will be erased during plugin upgrades. So remember to re-do this when you update the plugin.


    'supports'    => array( 'title', 'editor', 'thumbnail', 'excerpt' ),


    'supports'    => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),

3. Edit wp-content/themes/BuilderChild-Entree/restaurant-location/single.php.


    <?php //comments_template(); // include comments template ?>


    <?php comments_template(); // include comments template ?>

4. Go to My Theme -> Settings -> Comments. Place a tick mark for Locations and Save Settings.

Displaying course description on course term archive pages

Edit Course ‹ Builder Responsive Test Site — WordPress 2013-02-24 21-18-48.png


If you would like to show description on Course Term archive pages like, follow this:

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)


<h4 class="loop-title">

		$title = builder_get_tax_term_title();

		if ( is_paged() )
			printf( '%s – Page %d', $title, get_query_var( 'paged' ) );
			echo $title;



<h5 class="loop-description">
		$terms = get_the_terms( $post->ID, 'restaurant_course' );

		foreach ($terms as $term) {
 		   echo $term->description;

Then add the following at the end of child theme's style.css (WP dashboard -> Appearance -> Editor):

.loop-description {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    margin-left: 0.3em;

See also

← Back to Builder Codex Home