Problem:
Is there a way to list the terms selected inside the wpv-items-found so the user would have a quick view of what they have selected?
Solution:
1. Please add this code in your theme’s or child theme’s functions.php file:
function get_selected_filter_fun( $atts ) { // Attributes extract(shortcode_atts( array( 'taxonomy' => '', ), $atts )); if(isset($taxonomy)) { $term_value = 'wpv-'.$taxonomy; if( isset($_GET[$term_value]) && $_GET[$term_value] != ''){ $term_details = get_term_by( 'slug', $_GET[$term_value] , $taxonomy); return $term_details->name; } } else return 'Not selected'; } add_shortcode( 'get_selected_filter', 'get_selected_filter_fun' ); //Loop Counter add_shortcode('incrementor', 'incrementor'); function incrementor() { static $i = 1; return $i++; }
2. Register both shortcodes first ‘get_selected_filter’ and ‘incrementor’ in Toolset >> Settings >> Front-end Content >> Third-party shortcode arguments.
3. Then you can use these shortcodes in the View like this (its recommend to use in “Templates for this View” section since you are using ajax):
[php]Other solution could be using Custom jQuery code as client has done here:
https://toolset.com/forums/topic/displays-terms-in-wpv-items-found/#post-562040
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
Este tema contiene 9 respuestas, tiene 2 mensajes.
Última actualización por hace 7 años, 3 meses.
Asistido por: Noman.