arie_cristianD

disable featured image on Image Post Format

Jul 24th, 2025
879
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. add_filter( 'theme_mod_jnews_single_show_featured', 'custom_disable_featured_image' );
  2.  
  3. /**
  4.  * Disable Featured Image on Image Post Format.
  5.  *
  6.  * @param boolean $flag If featured image showing on single post.
  7.  * @return boolean
  8.  */
  9. function custom_disable_featured_image( $flag ) {
  10.     if ( 'image' === get_post_format() ) {
  11.         return false;
  12.     }
  13.     return $flag;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment