Advertisement
fauzanjeg

Use Excerpt for Subtitle

Jul 5th, 2021
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. /* Use Excerpt for Subtitle */
  2. function excerpt_to_subtitle( $subtitle ) {
  3.     if ( empty( $subtitle ) ) {
  4.         return the_excerpt();
  5.     }
  6.  
  7.     return $subtitle;
  8. }
  9. add_filter( 'jnews_single_subtitle', 'excerpt_to_subtitle' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement