Flex Slider for WP Rotator
[resolved] Flex Slider Caption Adustment recommendation (2 posts)

  1. Jason Paul
    Posted 4 years ago #

    As a themer I like as much style control of different elements of content as possible. I have a small recommendation regarding the caption of this slider:
    Line: 85
    if ( get_the_excerpt() ) $caption .= ' | ' . get_the_excerpt();

    Change this to something like

    if ( get_the_excerpt() ) $caption .= ' <span class="flex-excerpt">' . get_the_excerpt() . '</span>';

    I just really can use that hook so I can make the caption title look different than the excerpt. You probably have a better way of doing this but that's a quick fix.

    (also the '|' is really hard to work with css wise. If you have to keep it in perhaps wrap that in a span tag as well so someone could display:none that sucker if they wanted to?)


  2. Bill Erickson
    Plugin Author

    Posted 4 years ago #

    Great recommendation. I've updated the code, but didn't bump the version number up (so just wait an hour or two and then re-download).

    I also improved the 'be_flex_slider_caption' filter by passing it the title and excerpt. So if you did want it to go back to how it was ( Title - Excerpt ), you could add this to your functions.php file:

    add_filter( 'be_flex_slider_caption', 'be_customize_caption', 10, 3 );
    function be_customize_caption( $caption, $title, $excerpt ) {
    	$caption = $title . ' | ' . $excerpt;
    	return $caption;

    You can of course use this filter to customize the caption to display anything you want.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Flex Slider for WP Rotator
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic