8 Ways To Install Easing Slider Pro Version On Your Home Page

The name of the function for the pro version of the Easing Slider plugin is different to the free version so the code for installing the free version won’t work with the pro version. You can follow the tutorial about how to install the free ‘Lite’ version here.

In this tutorial, you’ll learn how to install the slider:

1. Using a custom function for themes which use hooks
2. In the header template file of any theme which doesn’t use hooks

Firstly, here’s the code to install the Pro version on your home or front page of a StudioPress child theme.

Home Page Before The Loop

add_action('genesis_before_loop', 'display_slider_before_posts_home');

function display_slider_before_posts_home() {
if (is_home() && function_exists('easingsliderpro') ) { 
easingsliderpro( 1 );
   
   }

}

The above code displays the slider before the blog posts on the home page.

Home Page After The Header

add_action('genesis_after_header', 'display_slider_before_posts_home');

function display_slider_before_posts_home() {
if (is_home() && function_exists('easingsliderpro') ) { 
easingsliderpro( 1 );
   
   }

}

The code above adds the slider after the header on the home page only.

Home Page In The Header

add_action('genesis_header', 'display_slider_before_posts_home');

function display_slider_before_posts_home() {
if (is_home() && function_exists('easingsliderpro') ) { 
easingsliderpro( 1 );
   
   }

}

The PHP code above displays the slider in the header on the home page only.

Using Static Page As Home Page

If you have created a custom home page and selected it to display on your front page using the WordPress Reading Settings, you’ll need to change the conditional tag in the code from:

is_home() to is_front_page()

Here’s an example after changing the conditional tag:

add_action('genesis_header', 'display_slider_before_posts_home');

function display_slider_before_posts_home() {
if (is_front_page() && function_exists('easingsliderpro') ) { 
easingsliderpro( 1 );
   
   }

}

Another option is to include the conditional tag for the home page and front page in the same function.

This way your slider will display on the home or front page regardless of your reading settings configuration.

Here’s an example after adding both conditional tags:

add_action('genesis_header', 'display_slider_before_posts_home');

function display_slider_before_posts_home() {
if ( is_home() || is_front_page() && function_exists('easingsliderpro') ) { 
easingsliderpro( 1 );
   
   }

}

Install Slider In Header Template File

If you’re using a theme which doesn’t includes hooks, you’ll need to add the slider function to a template file preferably in a child theme of the parent. This way it won’t be lost if you update the parent themes files at some stage down the track.

You can simply copy the header.php file to your child theme and add the code to it there.

There’s at least 3 different code snippets you can use to display a slider on the home or front page.

Default Home Page

Open the header.php file and paste the code in the position you want the slider to display.

The above code only works when you have selected Front page displays > Your latest posts in the Reading Settings page of WordPress.

Custom Page As Front Page

This code only works when you have selected Front page displays > A static page in the Reading Settings page of WordPress.

Default Home or Custom Page As Front Page

This code works when you have selected Front page displays > A static page or Your latest posts in the Reading Settings page of WordPress.

Reading Settings Screenshot

Reading Settings

Filters & Hooks for Developers

Easing Slider contains multiple hooks and filters for extending the PHP side of the plugin, both front-end and administrative as well as altering core values throughout the plugin.

Install Free Version

Simply replace the slider I.D (12345) in the following code.

add_action( 'genesis_after_header', 'slider' );
function slider() {
if ( function_exists( 'easingslider' ) ) {
	easingslider(12345); 
}}

Related Tutorials


Comments

2 responses to “8 Ways To Install Easing Slider Pro Version On Your Home Page”

  1. Matthew Ruddy Avatar
    Matthew Ruddy

    Thanks a million (once again) for your hard work Brad. Extremely helpful – will be pointing a lot of customers here!

    1. Brad Dalton Avatar
      Brad Dalton

      I’m checking in on your forum sometimes to see if i can answer a few questions so i always see you’re looking after people very well and happy to recommend your plugin.

      I normally recommend Easing Slider Lite and many people i send your way end up going for the premium version.

      Looking forward to learning more about your plugins hooks and filters so there’s lots to look forward too.

      Keep up the good work and thanks for stopping by Matthew.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.