Installation ↑ Back to top
Features by WooThemes is a free plugin for displaying features on your website. You can install it through your WordPress admin dashboard in Plugins > Add New.
After installing the plugin, you will see a new menu in your WP dashboard called Features. If you are not familiar with how to install a plugin, see: How to Install a Plugin.
Adding a Feature ↑ Back to top
To add a new feature, go to Features > Add New:
- Add a title in the title field.
- Add some content in the post editor.
- Add an image through the Featured Image panel.
- Add an URL in the Feature Details panel.
Usage ↑ Back to top
You have 3 options for displaying your Features, you can insert this with a shortcode, widget or insert this directly into a php template file or custom plugin.
Widget ↑ Back to top
To add your Features as a widget go to: Appearance > Widgets to find the Features Widget. With this you can modify the following settings.
Shortcode ↑ Back to top
To insert features into a post or page with a shortcode use the following example as a guide:
[woothemes_features limit="10" size="100"]
You can find all of the available parameters listed below. You can simply include these in your shortcode as well.
PHP ↑ Back to top
To display your features via a theme or a custom plugin, please use the following code into the desired php file:
<?php do_action( 'woothemes_features' ); ?>
Additional Parameters ↑ Back to top
To add arguments to this, please use any of the following arguments, using the syntax provided below:
- ‘limit’ => 5 (the maximum number of items to display)
- ‘orderby’ => ‘menu_order’ (how to order the items – accepts all default WordPress ordering options)
- ‘order’ => ‘DESC’ (the order direction)
- ‘id’ => 0 (display a specific item)
- ‘echo’ => true (whether to display or return the data – useful with the template tag)
- ‘size’ => 50 (the pixel dimensions of the image)
- ‘per_row’ => 3 (when creating rows, how many items display in a single row?)
- ‘link_title’ => true (link the feature’s title to it’s permalink)
- ‘title’ => ” (an optional title)
- ‘before’ => ‘<div>’ (the starting HTML, wrapping the features)
- ‘after’ => ‘</div>’ (the ending HTML, wrapping the features)
- ‘before_title’ => ‘<h2>’ (the starting HTML, wrapping the title)
- ‘after_title’ => ‘</h2>’ (the ending HTML, wrapping the title)
- ‘category’ => 0 (the ID/slug of the category to filter by)
The various options for the “orderby” parameter are:
<?php do_action( 'woothemes_features', array( 'limit' => 10, 'link_title' => false ) ); ?>
The same arguments apply to the shortcode which is
[woothemes_features] and the template tag, which is
<?php woothemes_features(); ?>.
Adjusting the limit and image dimension, using the arguments in the three possible methods:
<?php do_action( 'woothemes_features', array( 'limit' => 10, 'size' => 100 ) ); ?>
woothemes_features() template tag:
<?php woothemes_features( array( 'limit' => 10, 'size' => 100 ) ); ?>