Support » Plugin: Recent Posts FlexSlider » flexslider excerpt

  • Resolved kaquna



    in the file views/display.php, the line 82 is:

    $output .= '<p>' . $display->recent_post_flexslider_excerpt( get_the_content(), $excerpt_length ) . '</p>';

    although it is referring to the extract, it shows the content…

    how can I replace this line by substituting “get_the_content()” for “get_the_excerpt()” so that with each update I don’t have to change it every time?

    I tried putting the file in the child theme but it doesn’t work.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Wolfpaw


    The reason that I wrote it as is was to allow someone to set a custom excerpt length from the widget and just grab the start of the post.

    If you want to have it only display the excerpt, write this:

    $output .= '<p>' . $display->recent_post_flexslider_excerpt( get_the_excerpt(), $excerpt_length ) . '</p>';

    That will pull from the excerpt of the post (assuming a custom excerpt is set), and will still trim it to the length of characters set in $excerpt_length, which is a user-edited field in the widget settings.

    Thread Starter kaquna


    i know this

    but when I update the plugin, the change will have to be made again…
    that was my question. the way the update not affect the change.

    maybe put in the configuration a box to choose excerpt or content?

    Plugin Author David Wolfpaw


    Hi @kaquna I pushed an update to the plugin to clean up a few things. Among those changes is a new setting to choose whether you want to display the post excerpt, post content, or neither.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘flexslider excerpt’ is closed to new replies.