Advertisement
arie_cristianD

delete sidefeed in single post

Nov 27th, 2023
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. /* delete sidefeed in single post */
  2.  
  3. add_action(
  4.     'wp',
  5.     function () {
  6.         if ( is_single() && 'post' == get_post_type() ) {
  7.             add_filter( 'jnews_enable_sidefeed', '__return_false', 99 );
  8.             add_filter( 'body_class', 'delete_sidefeed', 99 );
  9.         }
  10.     }
  11. );
  12.  
  13. function delete_sidefeed( $classes ) {
  14.     $remove_class = array( 'jeg_sidecontent', 'jeg_sidecontent_center' );
  15.     $new_classes  = array_diff( $classes, $remove_class );
  16.     $classes      = $new_classes;
  17.     return $new_classes;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement