WordPress.org

Plugin Directory

Features by WooThemes

Show off what features your company, product or service offers, using our shortcode, widget or template tag.

Usage

To display your features via a theme or a custom plugin, please use the following code:

<?php do_action( 'woothemes_features' ); ?>

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)
  • 'custom_links_only' => true (link the feature's title only if a custom URL is set)
  • 'title' => '' (an optional title)
  • 'before' => '<div class="widget widget_woothemes_features">' (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:

  • 'none'
  • 'ID'
  • 'author'
  • 'title'
  • 'date'
  • 'modified'
  • 'parent'
  • 'rand'
  • 'comment_count'
  • 'menu_order'
  • 'meta_value'
  • 'meta_value_num'
<?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(); ?>.

Usage Examples

Adjusting the limit and image dimension, using the arguments in the three possible methods:

do_action() call:

<?php do_action( 'woothemes_features', array( 'limit' => 10, 'size' => 100 ) ); ?>

woothemes_features() template tag:

<?php woothemes_features( array( 'limit' => 10, 'size' => 100 ) ); ?>

[woothemes_features] shortcode:

[woothemes_features limit="10" size="100"]

Requires: 3.4.2 or higher
Compatible up to: 4.0.6
Last Updated: 2015-7-6
Active Installs: 30,000+

Ratings

3.4 out of 5 stars

Support

0 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

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

100,1,1
100,7,7 100,4,4 100,1,1 0,1,0
100,2,2 0,1,0
100,2,2
100,1,1
100,1,1 0,3,0
0,2,0
100,1,1
0,1,0
100,2,2
0,1,0
100,1,1