Advertisement
loreto_g

Untitled

Oct 19th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. function fwp_featured_listing_custom_query( $query ) {
  2. if ( is_page(1439) && $query->is_main_query() ) {
  3. $query->set( 'post_type', 'job_listing' );
  4. $query->set( 'post_status', 'publish' );
  5. $query->set( 'orderby', 'date' );
  6. $query->set( 'order', 'DESC' );
  7. $query->set( 'posts_per_page', 10 );
  8. $query->set( 'meta_query', array( array( "key" => "_featured", "value" => "1") ) );
  9. }
  10. }
  11. add_filter( 'pre_get_posts', 'fwp_featured_listing_custom_query' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement