artemsemkin

Rubenz Query Filter by Category

Jan 24th, 2021
510
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter( 'arts/elementor/rubenz_widget_portfolio_fullscreen_headings_slider/query_args', 'custom_rubenz_widget_portfolio_fullscreen_headings_slider_query_args' );
  2. function custom_rubenz_widget_portfolio_fullscreen_headings_slider_query_args( $args ) {
  3.  
  4.   $args = array(
  5.     'tax_query' => array(
  6.       array(
  7.         'taxonomy' => 'arts_portfolio_category',
  8.         'field'    => 'slug',
  9.         'terms'    => array( 'design' ), // include only posts of the current categories (slugs)
  10.       ),
  11.     ),
  12.   );
  13.  
  14.   return $args;
  15.  
  16. }
RAW Paste Data