• I use facetwp the documentation is well provided
    I would like to connect that my template displays the PVC_MOST_VIEWED_POSTS ()
    everything is there how to connect them?

    facetwp_query_args

    // Sort by title if the shortcode template is named "bravo"
    add_filter( 'facetwp_query_args', function( $query_args, $class ) {
        if ( 'bravo' == $class->ajax_params['template'] ) {
            $query_args['orderby'] = 'title';
            $query_args['order'] = 'asc';
        }
        return $query_args;
    }, 10, 2 );

    PVC_GET_MOST_VIEWED_POSTS()
    PVC_MOST_VIEWED_POSTS()

    I must have an example to understand

  • The topic ‘Connect Post Views Counter to facetwp_query_args’ is closed to new replies.