Which shortcodes can be templated?
Blog Books Clients Coupons Custom Post Type Events Jobs Locations Movies News Person Portfolio Pricing Table Project Quotes Recent Books Recent Clients Recent Coupons Recent Events Recent Jobs Recent Locations Recent Movies Recent News Recent Portfolios Recent Posts Recent Projects Recent Quotes Recent Recipes Recent Team Recent Testimonials Recipes RSS Team Testimonials TestimoniesTemplates Custom Post Type
The templates custom post type allows you to be creative and build your own templates. With the use of the Post Fields shortcode and/or the Post Meta Data shortcode, you can display any of the metabox data inside of your template. You can also show the content, title, and/or featured images. This allows you to create templates in the editor without having to know how to write the code and having to deal with files.
You can create templates that are used for the single post page or you can create templates that are for showing items in a list. When showing your items in a list, you get to chose from a one, two, three, four, or six column layout. This gives you a lot of flexibility to build your templates the way you want. Have fun, be creative and share your templates with us if you would like.
The following template was created for the Books shortcode, as a Templates custom post type.
Template
Post Type: Books
Type: Multiple
Columns: 2
Editor Content:
[intense_row padding_top="10"]
[intense_column size="4" medium_size="4"]
[intense_post_fields type="books" field="book_image" size="full"]
[intense_spacer height="5"]
[intense_post_fields type="books" field="book_audio_clip"]
[/intense_column]
[intense_column size="8" medium_size="8"]
<div style="padding-right:10px;">
<h3 style="margin:0px;">[intense_post_fields type="books"]</h3>
[intense_post_fields type="books" field="content" excerpt_length="35"]
</div>
[/intense_column]
[/intense_row]
Shortcode
[intense_books post_type=”intense_books” taxonomy=”intense_book_category” template=”template_2484″ posts_per_page=”2″ post_count=”2″ show_meta=”0″ show_author=”0″ post_excerpt=”intense_book_excerpt” show_filter=”0″]
File Templates
Our included templates are stored as files. You can create your own templates this way as well. This is more for people that know how to write or modify PHP code. If you like a template of ours and want to tweak it or completely change it, you can easily achieve this by copying the file, making changes to it and putting it into a specified folder structure, either in your theme or your child-theme.
The following is a standard Recent Posts template that shows images on top.
The End of Boring
Donec pulvinar tristique tellus, sed dapibus nisl scelerisque sed. Pellentesque non nunc et felis…
Beyond the Code
Etiam nisi ligula, varius eget magna et, tristique sagittis diam. Donec est enim, eleifend…
Namche Bazaar
Maecenas auctor scelerisque ipsum quis volutpat. Morbi iaculis bibendum nibh, sit amet iaculis urna…
The shortcode above uses most of the default values, so it is a very small shortcode. The “show_meta” option is set to “0”, which hides the meta information that would be found under the title. The meta information will show the date, comment count, and author of the post.
Template Shortcode
Use the template shortcode to add the content of a file template to the post or page. The file template, along with the template shortode, are a perfect way to add dynamic content. They are also a powerful way to reuse content across your WordPress website.