Advanced Content Templates

logo

Advanced Content Templates provides a simple, easy-to-use post content template system to WordPress. Instead of opening an old post for editing, copying and pasting various details into a new post and saving, you can create a post template and load it automatically (or manually) every time you create a new post!

Example:  Say you’re a photographer who blogs about your wedding shoots. It’s likely that each one of these posts will have a similar format, with the same general outline and content. With Advanced Content Templates, you could create a template called Wedding Shoots, and load it anytime you’re posting about a wedding.

Going further, if you have specific templates that should be used for specific content types, you can have your templates automatically loaded each time a new post is added to that post type.

Example: Say you have a ‘Book Reviews’ post type. You could create a ‘Book Review’ template that is loaded each time you click ‘Add New Book Review’. Magically!

Better yet, Advanced Content Templates supports every aspect of a WordPress post. Here are the fields you can set in your templates:

  • Title
  • Excerpt
  • Content
  • Taxonomies (tags, categories, custom)
  • Featured Image
  • Post Format
  • Custom Fields
  • Page Template (only works for pages)
  • Page Order

Beyond this, you can even use PHP inline in your templates to create content that is dynamically generated each time the template is loaded.

Example: You could automatically insert the date into a ‘Recipe of the Month’ post title. 

Installation

Are you ready for this? It’s about to get really intense.  Try these steps on for size:

  1. Unzip downloaded zip file and upload advanced-content-templates folder to /wp-content/plugins/
  2. Go to Plugins and click “Activate” next to Advanced Content Templates.

Configuration

The Advanced Content Templates settings page is accessible by going to Content Templates -> Settings.  It looks like this:

Screenshot 2014-02-08 12.15.21

License Key

To receive support and updates, you’ll need to enter your license key (provided at purchase) and save your key settings.  This will reveal a button that will allow you to activate the current site.  The number of activations you receive depends on the license you purchased.

Post Type Settings

Each public post type (ie, one that has a menu) will show up with a checkbox and a dropdown.  The checkbox adds a Advanced Content Templates metabox to the edit / create screens for that post type, allowing you to load a content template manually.

The dropdown lets you set a content template that will load automatically every time you create a new post of that type. This will initially be empty as you’ll need to create a template!

Enable PHP

This toggle allows you to put inline PHP in your templates.  This PHP only runs when you create a new post with that template.
It shouldn’t be confused with plugins that allow you to put dynamic PHP in posts that is executed each page load.  This is simply to allow you to setup dynamic content in your templates.
A great example of how you could use this is for those daily or monthly updates where you find yourself typing in the date, over and over.
You could simply add something like this to the template:

<?php echo date('m'); ?>
This bit of PHP will be executed and the month will appear in its place each time you load the template.

There are a great many uses for this feature, but it is disabled by default since any adhoc execution of PHP is a security risk by default.  You should only enable this at your own risk, and when you absolutely trust your authors!

Creating Content Templates

Adding a new post content template with Advanced Content Templates is no different than writing a new new post.  Simply find the new “Content Templates” menu in WordPress Admin and click “Add Template”:

Screenshot 2014-02-08 12.21.52

You’ll be presented with a new post screen that is identical to the normal WordPress new post screen.

Screenshot 2014-02-08 12.24.44

The only new things you’ll see on this screen that you may not otherwise expect is the “Template” and “Attributes” metaboxes on the right.

Both of these meta boxes are on the New Page editor in WordPress, and can really only be used with Pages in WordPress.  The template dropdown (I know, it’s confusing to have a ‘template’ dropdown on a ‘New Template’ screen :) ) allows you to select a page template, just like you would on the new page screen.

The Attributes box allows you to set a page order.  This should work for all content types in WordPress, but it’s usually reserved for pages so your mileage may vary.  This normally let’s you to control the order pages show up, but theoretically can be used for posts too.  This is probably an edge case feature since it’s unlikely you’ll want to assign a particular order to all new posts.

Other than this, all the rest should be completely familiar. You can select tags, categories, images, custom fields, etc using the same technique you would editing a normal post. When you’re done, just click “Publish”!

Changelog

Version 1.0.8

Version 1.0.7

  • Ok, but seriously. We’re going to get this right this time. Post title now is only set if an existing title is not in place.

Version 1.0.6

  • Don’t set post title of target post if post title is already set. (Exception to overwrite rule)

Version 1.0.5

  • Loosen search for post types to include posts that have exclude_from_search set to true.  More post types should now work with ACT!

Version 1.0.4

  • Fix dreaded updater issue.

Version 1.0.3

  • Fixed issue with Simple Post Template upgrade sequence.

Version 1.0.2

  • Fixed error with anonymous functions and older versions of PHP.

Version 1.0.1

  • Fixed warnings and notices.

Version 1.0

  • Initial release.

Support

If you have problems, the preferred way to get support is to contact me through my contact page.

Reviews

  1. Greg Welch says

    We were so excited when we came across this great little WordPress add-in that allows us to create several blog post templates and then apply the template of choice to our daily podcast posts. Since a portion of the content from our daily real estate industry interview posts are repetitive, we were looking for a way to reduce the amount of time spent typing this information out for each and every post. This add-in was just what we were looking for. Now we can spend more time on our creative content rather than on tedious typing. So thank you, Clif and the CDG Team for creating this add-in

    ~ Greg Welch Realestateradioshow.com

Leave a Review

Your email address will not be published. Required fields are marked *