Below you can find the list of functions that can be used in slider theme display file. Please note that these functions should only be used inside slider themes display.php file. Functions that should be used inside the slides loop will be marked as such.

Slider template functions

These functions can be used outside the slides loop. They control various settings for slider themes. All functions must be used in slider themes display.php file.

get_slider_theme_options()

This function retrieves slider theme specific settings implemented by its functions.php file. The function returns an array of options, same as the ones introduced by the theme.

Usage
get_slider_theme_options();
Parameters

None.

Returned value

Array of options if theme implements new slider options or false otherwise.


the_slider_title()

Displays the slider title. Depending on slider settings set by user, the title might not be displayed if user denies it.

Usage
the_slider_title( $before, $after, $echo );
Parameters

$before
(string, optional) Text to place before the title. Default <h2>
$after
(string, optional) Text to place after the title. Default </h2>
$echo
(boolean, optional) Display the title (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_slider_title( '<h1>', '</h1>' );?>

the_slider_class()

Displays the slider CSS classes needed to operate and display correctly.

Usage
the_slider_class( $class, $echo );
Parameters

$class
(string, required) A CSS class for the slider.
$echo
(boolean, optional) Display the CSS classes (TRUE) or return them for use in PHP (FALSE). Default true.

Example
<?php the_slider_class( 'my-slider-theme' );?>

the_slider_styles()

Output various CSS styles for the slider according to user settings.

Usage
the_slider_styles( $echo );
Parameters

$echo
(boolean, optional) Display the CSS styles (TRUE) or return them for use in PHP (FALSE). Default true.

Example
<?php the_slider_styles();?>

the_slider_id()

Outputs a unique slider ID for current slider to be used in HTML.

Usage
the_slider_id( $echo );
Parameters

$echo
(boolean, optional) Display the slider id (TRUE) or return them for use in PHP (FALSE). Default true.

Example
<?php the_slider_id();?>

the_slider_data()

Outputs various data attributes to be used by the slider script to implement its functionality based on user settings.

Usage
the_slider_data( $echo );
Parameters

$echo
(boolean, optional) Display the slider data attributes (TRUE) or return them for use in PHP (FALSE). Default true.

Example
<?php the_slider_data();?>

has_bottom_nav()

Conditional function, checks if user allowed dots navigation (usually at the bottom) to be displayed into the current slider.

Usage
has_bottom_nav();
Parameters

None.

Return

(boolean) Display the bottom navigation (TRUE) or hide it (FALSE).


has_sideways_nav()

Conditional function, checks if user allowed previous/next navigation to be displayed into the current slider.

Usage
has_sideways_nav();
Parameters

None.

Return

(boolean) Display the prev/next navigation (TRUE) or hide it (FALSE).


get_slides_count()

Returns the number of slides to be displayed into current slider.

Usage
get_slides_count();
Parameters

None.

Return

(integer) Number of slides in current slider according to user settings.


get_current_slide()

Returns the current slide post object. This function must be used within the slides loop.

Usage
get_current_slide();
Parameters

None.

Return

(object) Post object for current slide within the slides loop.

Slides template functions

Below are templating functions that can be used to display various information for individual slides within a slider. All functions must be used in Featured Articles slider themes inside file display.php.

the_fa_title()

Displays the current slide title. This function must be used within the slides loop.
Depending on slider settings set by user, it will display either the post title or the custom title set for the post selected to be used as slide.

Usage
the_fa_title( $before, $after, $echo );
Parameters

$before
(string, optional) Text to place before the title. Default <h2>
$after
(string, optional) Text to place after the title. Default </h2>
$echo
(boolean, optional) Display the title (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_title( '<h1>', '</h1>' );?>

the_fa_author()

Displays the current slide author name. This function must be used within the slides loop.

Usage
the_fa_author( $before, $after, $echo );
Parameters

$before
(string, optional) Text to place before the author name. Default: empty string;
$after
(string, optional) Text to place after the author name. Default: empty string;
$echo
(boolean, optional) Display the author name (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_author( '<span class="the-fa-author">', '</span>' );?>

the_fa_avatar()

Displays the avatar image of the slide author. This function must be used within the slides loop.

Usage
the_fa_avatar( $before, $after, $author_link, $echo );
Parameters

$before
(string, optional) Text to place before the image. Default: empty string.
$after
(string, optional) Text to place after the image. Default: empty string.
$author_link
(string, optional) Link avatar to author page (TRUE) or don’t. Default false.
$echo
(boolean, optional) Display the avatar (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_avatar( '<div class="fa-avatar">', '</div>' );?>

the_fa_date()

Displays the current slide publishing date. This function must be used within the slides loop.

Usage
the_fa_date( $before, $after, $echo );
Parameters

$before
(string, optional) Text to place before the date. Default: <span class=”fa-date”>
$after
(string, optional) Text to place after the date. Default: </span>
$echo
(boolean, optional) Display the date (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_date( '<span class="the-fa-date">', '</span>' );?>

the_fa_content()

Displays the current slide content. This function must be used within the slides loop.
Depending on slider settings set by user, it will display either the post content, post excerpt or the custom description set for the post selected to be used as slide. HTML tags within the content will be displayed according to content slider settings.

Usage
the_fa_content( $before, $after, $echo );
Parameters

$before
(string, optional) Text to place before the content. Default <h2>
$after
(string, optional) Text to place after the content. Default </h2>
$echo
(boolean, optional) Display the content (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_content( '<div class="slide-content">', '</div>' );?>

the_fa_read_more()

Displays the current slide read more link. This function must be used within the slides loop.
Depending on slider settings set by user, the link will point to post permalink or to the custom URL set by user in slide settings.

Usage
the_fa_read_more( $class, $echo );
Parameters

$class
(string, optional) CSS class to set on anchor. Default fa-read-more;
$echo
(boolean, optional) Display the read more anchor (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_read_more( 'read-more' );?>

the_fa_play_video()

Displays the current slide play video link trigger. This function must be used within the slides loop.

Usage
the_fa_play_video( $class, $open, $show_text, $echo );
Parameters

$class
(string, optional) CSS class to set on anchor. Default empty string;
$open
(string, optional) Determines how the video will be loaded into the slider. Values: self (will embed the video into directly into the slide), modal (will open video in modal window). Default self.
$show_text
(boolean, optional) Display the anchor text set in slider settings (TRUE) or skip it (FALSE). Default true.
$echo
(boolean, optional) Display the play video anchor (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_read_more( 'read-more' );?>

the_fa_image()

Displays the current slide image. This function must be used within the slides loop.

Usage
the_fa_image( $before, $after, $set_width, $overlay_link, $echo );
Parameters

$before
(string, optional) Text to place before the image. Default <div class=”image_container”>
$after
(string, optional) Text to place after the image. Default </div>
$set_width
(boolean, optional) Apply width CSS styling to image (TRUE) or skip it (FALSE). Default false.
$overlay_link
(boolean, optional) Put a play video anchor over the image (TRUE) or skip it (FALSE). Default true.
$echo
(boolean, optional) Display the image (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_image( '<div class="fa-image">', '</div>', false, false );?>

the_fa_class()

Outputs the current slide CSS class set by user in slide settings. This function must be used within the slides loop.

Usage
the_fa_class( $echo );
Parameters

$echo
(boolean, optional) Display the CSS class (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_fa_class();?>

the_slide_styles()

Outputs the current slide CSS styling set by user in slide settings. This function must be used within the slides loop.

Usage
the_slide_styles( $echo );
Parameters

$echo
(boolean, optional) Display the styling (TRUE) or return it for use in PHP (FALSE). Default true.

Example
<?php the_slide_styles();?>