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

Reply To: [Waiting for user confirmation] Display Front-End Filter Selection in Results? e.g. You search for [Query Here]

$
0
0

Thanks again, Caridad. Although I suspect I'm doing something wrong. My views code is the same. Here's my new markup:

// WP Views Function; Displays User Selected Filters

add_shortcode( 'wpv-post-param', 'wpv_post_param_shortcode' );
function wpv_post_param_shortcode( $atts ) {
  if ( !empty( $atts['var'] ) ) {
    $var = (array)$atts['var'];
    return esc_html( implode( 'north-armerica, europe, asia, south-america', $var ) );
  }
}

When searching, it displays "wpv-region" but not the filtered attribute (asia, north-america, south-america, europe). I'm hoping for it to only return this attribute(s). Example: I select asia. In the results the text-value "asia" will be displayed.

Link: http://jsandlund.staging.wpengine.com/news/


Viewing all articles
Browse latest Browse all 20145

Trending Articles