Advertisement
phpface

Untitled

Oct 25th, 2017
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. if( ! function_exists( 'filter_the_main_video_args' ) ){
  2.     /**
  3.      *
  4.      * Filter the main video args
  5.      *
  6.      * @param unknown $query_args
  7.      * @param unknown $widget_id
  8.      */
  9.     function filter_the_main_video_args( $query_args, $widget_id ) {
  10.         // Do not query these tag videos
  11.         $query_args['tax_query'][] = array(
  12.             'taxonomy' => 'video_tag',
  13.             'field'    => 'slug',
  14.             'terms'    => array( 'tag_1', 'tag_2', 'tag_3' ),// or array( 'tag_1' )
  15.             'operator' => 'NOT IN'
  16.         );
  17.         return $query_args;
  18.     }
  19.     add_filter( 'mars_main_widget_args' , 'filter_the_main_video_args', 10, 2 );
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement