Forum: Nearby Posts

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Nearby Posts premium extension please open a new premium support ticket.

[Resolved]Filter for post status

Home Forums Nearby Posts Filter for post status

This topic contains 0 replies, has 1 voice, and was last updated by  bdollin 3 years ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #53623

    bdollin
    Participant

    Hello, I have project_type = ‘projects’ in my posts table and I am trying to filter for a comment status of ‘open’ but the results bring back all records that show closed or open. Wondering if you can lend a hand
    Thanks

    function gmw_modify_wholeQuery_by_status( $meta_args, $gmw ) {
    //replace the value 1 with the form ID that you are modifying
    if ( $gmw[‘ID’] == 1 ) {
    $args = array (
    ‘post_type’ => ‘project’,
    ‘comment_status’ == ‘open’,
    );
    }
    return $args;
    }
    add_filter( ‘gmw_pt_search_query_args’, ‘gmw_modify_wholeQuery_by_status’, 10, 2 );

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.