Wooslider – Template tags explained

Ok, let me get this out of the way first…I love Wooslider.

It’s an awesome, configurable and very flexible slider for WordPress. The only negative thing I have to say about it is this..

They don’t make it very clear how to use the template tags for anyone who wants to embed this thing in a template file.

So I’m going to try and clear it up for you. This page explains how to create template tags for Wooslider.

The documentation does explain how to embed shortcodes, and shortcodes are your clue to how the template tags work. They’re basically the same thing.

The page you really need to be looking at before you start, is the Wooslider shortcodes page. This page contains all the actions you can tell Wooslider to do in your template tags.

But how do you write your template tags?

Some typical template tags are provided on the getting started page…but it’s not immediately clear what does what. I’ll explain.

An empty Wooslider template tag looks like this:


If you are writing this as PHP it looks like:

<?php wooslider(); ?>

Each time you add a set of shortcodes inside the () you have to assign them to one of the ‘array’ groups, of which there are three. This is important. The actions will only work if you put them in the correct array group.

  1. In the first one, add any shortcode from General settings, Control Settings, or Button settings on the Wooslider shortcodes page.

    <?php wooslider( array( 'slider_type' => 'posts', 'smoothheight' => 'true' ), array( 'tag' => 'featured' ) ); ?>

  2. In the second one, add anything from the ‘specific parameters’ shortcodes on the Wooslider shortcodes page.

    <?php wooslider( array( 'slider_type' => 'posts', 'smoothheight' => 'true' ), array( 'tag' => 'featured' ) ); ?>

  3. In the third one, I have no idea what to do…I’ve never needed it and i don’t know what it does. Leave your best guess in the comments below 😀

Now put it all together:

Use the standard template tag format to add all the shortcodes you require. Here’s one I wrote earlier:

<?php wooslider( array( ‘slider_type’ => ‘posts’, ‘smoothheight’ => ‘true’), array( ‘category’ => ‘homepage-feature-post’, ‘overlay’ => ‘full’, ‘link_title’ => ‘true’, ‘layout’ => ‘text-bottom’ ) ); ?>

This tag reads as follows…

First array (Settings options) set slider type to posts, make the slider resize with smoothheight to the size of the image.

Second array (Parameters options) set category to ‘homepage-feature-post’, set overlay to full, turn on link title and put the text at the bottom.

Pretty easy huh? You can now paste this shortcode into the relevant place in your index.php template or wherever you want the slider to display!

Hope it helps.

Author: Jim O

Hi I'm Jim and I run SuperCreatives which is basically me tapping at a keyboard and sometimes talking to people and working on stuff that helps people sell, communicate or promote things online. If you need to sell, communicate or promote things online...get in touch!

6 thoughts on “Wooslider – Template tags explained”

  1. Why not just use the default shortcodes like this

    Note that you can set multiple categories and tags using comma separated
    also just make sure that the plugin is running.

  2. they work perfect with template. I did post example however the php code will not show. (wrap it in php code)
    if (function_exists(‘wooslider’)) echo do_shortcode(‘[wooslider tag=”artwork” slider_type=”posts” layout=”text-right” display_excerpt=”false”]’)

  3. Thanks Ben! Just changed mine to:

    < ?php if (function_exists('wooslider')) echo do_shortcode('[wooslider category="homepage-feature-post" slider_type="posts" layout="text-bottom" display_excerpt="true" smoothheight="true" overlay="full" link_title="true"]'); ?>

    And it works perfectly! Don’t know why I didn’t try that first 😀

  4. Hi, thanks for this helper. Works for me except I’m not able to change the image size. I’m using

    ‘posts’, ‘smoothheight’ => ‘true’ ), array( ‘tag’ => ‘featured’, ‘size’ => ‘medium’, ‘overlay’ => ‘natural’, ‘link_title’ => ‘true’ )); ?>

    Am I missing something


  5. Hi,

    How would one add a specific SLIDE GROUP to a template.
    I do not want to use shortcode or echo shortcode.

    ‘slides, ‘slide_page => ‘home-page’ ) ); ?>

    Thank you

Leave a Reply

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