WordPress.org

Ready to get started?Download WordPress

Plugin Directory

R.W. Elephant Inventory Gallery

Gallery displays R.W. Elephant rental inventory on your website.

Customizing Templates

The gallery is displayed on the chosen WordPress page by inserting it into the content of the page. If you wish to change the appearance of the page beyond the content area, such as to change the page width or change the way the page heading is displayed, change the page template in WordPress. To select a different WordPress page template: (Pages->Edit->Select your gallery page->Template). You can modify or make a new page template for WordPress. Normally you will want to use a full width page template.

The R.W. Elephant Inventory Gallery uses templates for the layout of the gallery. You can modify the provided templates. A template named custom with minimal styling is provided if you wish to use it build your own template design. The gallery templates use placeholders which are be replaced with the appropriate gallery information when the pages are displayed on your website.

Templates are located in the /wp-content/plugins/rwe-gallery/templates/ directory. In this directory you will find sub-directories named for each template style. The individual template files are located in each sub-directory. Some parts of templates are shared. The shared templates located in the common template directory.

Following is a list of templates and the placeholders available for each:

Common templates (located in `/templates/common/`)

  • category-list.php

This is a sub-template used to create the main category list. This template is used to display each category.

[category_name] = name of the category [category_url] = the URL of the category [category_thumbnail] = the category thumbnail, including the tag [category_thumbnail_url] = the category thumbnail, the URL of the image only

  • item-list.php

This is a sub-template that creates lists of items. It is used for listing items in a category, items for a tag and for search results.

[item_name] = name of the item [item_url] = full URL to the item [item_quantity] = quantity of the item [item_price] = price of the item [item_dimensions] = dimensions of the item [item_photo] = the item thumbnail, including the tag [item_photo_url] = the URL of the item thumbnail image

  • search-form.php

This template is used to create the search form for searching your gallery. This template is included in other templates.

[gallery_name] => the name of the gallery [gllery_url] => the URL of the main gallery page, submit the form to this location

  • script.js

This contains JavaScript to switch the item image when you click on an alternate image. You can include additional JavaScript in this file. This file is included on all gallery pages.

Individual templates (located in `/templates/*template_name*/`)

  • categories.php

This template displays the main categories. It is the home page of your gallery.

[gallery_name] = the name of the gallery [gallery_url] = the URL of the main gallery page [search_form] = displays the search form [category_list] = this is the list of categories, created by the template common/category-list.php [category_thumbnail_size] = the size of category thumbnail in pixels, either 100 or 200 [error] = displays error message on the page, if there is an error

  • category.php

Lists the items in a selected category.

[gallery_name] = the name of the gallery [gallery_url] = the URL of the main gallery page [search_form] = displays the search form [category_name] = the name of the category [category_items] = the list of items, created by the template `common/item-list.php' [category_thumbnail_size] = the size of category thumbnail in pixels, either 100 or 200 [error] = displays error message on the page, if there is an error [page_url] = the URL of the current page (the category)

  • item-detail.php

An individual item page.

[gallery_name] = the name of the gallery [gallery_url] = the URL of the main gallery page [search_form] = displays the search form [item_name] = name of the item [item_description] = item description [item_quantity] = quantity [item_category_name] = the name of the item's category [item_category_url] = the URL of the item's category [item_photo] = main photo, in tag [item_photo_url] = the URL to the main photo [item_thumbnails] = the alternate images, each is inside

  • tags and linked to its corresponding large image. [item_thumbnails_url] = a comma separated list of URL for the alternate images [item_tags] = a list of tags for the item, inside
  • element and linked to the corresponding tag page [item_dimensions] = dimensions of the item in format X x Y x Z [item_price] = the price of the item [error] = displays error message on the page, if there is an error [page_url] = the URL of the current page (the item) [social_links] = a div containing the sharing links enabled via plugin settings.
    • search-results.php

    A list of search results.

    [gallery_name] = the name of the gallery [gallery_url] = the URL of the main gallery page [search_form] = displays the search form [search_terms] = the search term(s) for these search results [search_items] = a list of items that match the search, created by the template `common/item-list.php' [category_thumbnail_size] = the size of category thumbnail in pixels, either 100 or 200 [error] = displays error message on the page, if there is an error [page_url] = the URL of the current page (the search results)

    • tag.php

    List of items for a tag.

    [gallery_name] = the name of the gallery [gallery_url] = the URL of the main gallery page [search_form] = displays the search form [tag_name] = the name of the tag [tag_items] = a list of items for this tag, created by the template `common/item-list.php' [category_thumbnail_size] = the size of category thumbnail in pixels, either 100 or 200 [error] = displays error message on the page, if there is an error [page_url] = the URL of the current page (the tag)

    • style.css

    The style sheet for the template. This file is included on all gallery pages.

    Requires: 3.0 or higher
    Compatible up to: 3.5.2
    Last Updated: 2013-2-25
    Downloads: 655

    Ratings

    5 stars
    5 out of 5 stars

    Support

    Got something to say? Need help?

    Compatibility

    +
    =
    Not enough data

    0 people say it works.
    0 people say it's broken.

    100,1,1