Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Assigned] Stop View from displaying all results when there is no URL parameter set

$
0
0

Dear Ian,

Sorry, it's my mistake, i forgot about one line, please use this code

add_filter('wpv_filter_query', 'my_filter_post_id', 14, 3);
function my_filter_post_id( $query_args, $query, $view_id ) {
    if ( !is_admin() && $view_id == 98 && !isset($_GET['pi']) ) {
        $query_args['post__in'] = array('0');
    }
    return $query_args;
}

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.
Regards,
Gen.


Viewing all articles
Browse latest Browse all 20145

Latest Images

Trending Articles



Latest Images