Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fwp_featured_listing_custom_query( $query ) {
- if ( is_page(1439) && $query->is_main_query() ) {
- $query->set( 'post_type', 'job_listing' );
- $query->set( 'post_status', 'publish' );
- $query->set( 'orderby', 'date' );
- $query->set( 'order', 'DESC' );
- $query->set( 'posts_per_page', 10 );
- $query->set( 'meta_query', array( array( "key" => "_featured", "value" => "1") ) );
- }
- }
- add_filter( 'pre_get_posts', 'fwp_featured_listing_custom_query' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement