Christian, Husband, Dad, Photographer, Web Developer.

WordPress Plugin: FlexSlider for Developers

This plugin will allow developers to setup FlexSlider rotator placeholders in your themes which are easily updateable by your clients.

Download Now

How to Setup a Basic Homepage Rotator

In your functions.php file of your theme you will setup the rotators using WordPress ‘filters.’

function set_flexslider_hg_rotators()
  $rotators = array();
  $rotators['homepage'] = array( 'size' => 'homepage-rotator' );
  return $rotators;
add_filter('flexslider_hg_rotators', 'set_flexslider_hg_rotators');

The image ‘size’ part of the function above corrolates to the WordPress add_image_size. This is also in your functions.php file.

add_image_size( 'homepage-rotator', '550', '250', true );

Then in the template (page.php, single.php, home.php, etc.), where you want the rotator to display you will add the following piece of PHP code. Change the ‘homepage’ part to the same slug you used when you added the function above.

<?php if(function_exists('show_flexslider_rotator')) echo show_flexslider_rotator( 'homepage' ); ?>





Next Post

Previous Post

© 2016 HalGatewood.com

Theme by Anders Norén