tp090

functions.php

Apr 8th, 2017
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3.  * Custom Function File
  4.  *
  5.  * Place your custom function, filter and hooks here.
  6.  *
  7.  */
  8. /*
  9. This functions display a custom teaser, by finding the teaser content using preg_split. It then appends a custom more link and returns the filtered content which then will show up in your RSS feed.
  10. */
  11. function ffm_rss_teaser( $content ){
  12.   $teaser = preg_split( '/<\/span>/', $content );
  13.   $content = $teaser[0];
  14.   return $content;
  15. }
  16. add_filter( 'the_content_feed' ,'ffm_rss_teaser' );
RAW Paste Data