Advertisement
artemsemkin

Kinsey Theme: filter portfolio posts by categories on specific pages

Apr 8th, 2023 (edited)
658
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2.  
  3. add_filter( 'arts/elementor/kinsey_widget_portfolio_masonry_grid/query_args', 'custom_kinsey_filter_2' );
  4. function custom_kinsey_filter_2( $args ) {
  5.   global $post;
  6.  
  7.   if ( $post->ID === 3285 ) {
  8.     $args['arts_portfolio_category'] = 'yachting';
  9.   } elseif ( $post->ID === 4035 ) {
  10.     $args['arts_portfolio_category'] = 'residential-complex';
  11.   } elseif ( $post->ID === 4039 ) {
  12.     $args['arts_portfolio_category'] = 'hotel';
  13.   } elseif ( $post->ID === 4037 ) {
  14.     $args['arts_portfolio_category'] = 'residential';
  15.   }
  16.  
  17.   return $args;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement