I was inspired by the wonderful work of the WooThemes team when I saw and subsequently used the various features on the custom home pages that come with their theme work. I noticed that often a theme will create a number of custom post types in order to allow the admin to create a number of objects to be used in a specific point within a theme.
There is a common system called the Mini Feature. This is really a generic name for a small item with thumbnail and intro text to promote a feature or service of the site. We all know that home pages look boring if they match the rest of the site but often if you are trying to dream up a theme or make something yourself inspiration might be hard to come by. These little features break up a page using a shortcode to generate the output for a pre styled grid type view of the items in the post type.
Adding the plugin and activating it will add a new post type and taxonomy for you. When you use the shortcode ‘[sb_mini_feature]‘ it will show the last 6 in 3 column view from all features. I have, however, added support for a number of different argument to the shortcode as follows:
- limit (default 6)
- cols (default 3)
- heading_type (default h2)
- orderby (default menu_order)
- cat (default none)
The last is worth talking about. It accepts the slug of an item of the new taxonomy that the plugin creates so you can create a mini feature list for different areas of your site if you wish.
The mini features are, by default, linked to their own item pages which will show the content you enter into the editor part of the feature. However, you might not want this and so I have allowed for a custom link to be used and also for the link to be disabled entirely. It should give enough flexibility for most situations.
The excerpt of the mini feature is shown verbatim if it exists. I have intentionally pulled this directly from the post object so that the excerpt_more filter is not used. This means no read more tag. I can make this optional if anyone feels they want a continue reading link.
Download
SB Mini Features (599.77 kB)
Screenshots
The plugin comes complete with a pre-styled 24 column responsive grid (in my experience 12 is never enough for complex layouts) with unique classnames to avoid conflict but you should be able to override these styles using your theme CSS. Examples of the output of the plugin in various forms are as follows: