• Resolved SeyMedia

    (@seymedia)


    I am using a plugin to search by taxonomies. It’s working great, the problem is that i want to display on the results page all searched taxonomy terms.
    For example i have searched for: [genre]action + [year]2016 + [trailer]yes. I want to display: action – 2016 – yes or action – 2016 if i search only for the first two.
    Explanation: [taxonomy]term.

    Ok… So far i have found two pieces of code that can help, but not to display ALL searched terms.

    $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
    echo $term->name;

    This will display the last searched term(“yes” – in my example)

    $term =	$wp_query->queried_object;
    echo  $term->name;

    This will display first searched term(“action” – in my example).

    Any ideas how to display all the searched terms?

The topic ‘Display all searched taxonomy terms’ is closed to new replies.