FEATURE Handling active filters when page has query vars
This commit is contained in:
parent
86864d3132
commit
965f097507
|
|
@ -4,6 +4,7 @@ $posts_query = $args['posts_query'] ?? null;
|
|||
$post_count = $posts_query->post_count;
|
||||
$current_post_type_obj = get_post_type_object($current_post_type);
|
||||
|
||||
$etiquette_active_filter_slug = $args['etiquette_active_filter_slug'] ?? null;
|
||||
|
||||
$post_ids = wp_list_pluck($posts_query->posts, 'ID');
|
||||
|
||||
|
|
@ -39,7 +40,7 @@ $tags = get_terms(array(
|
|||
<select name="etiquettes">
|
||||
<option value=""><?php _e('Tous les tags', 'dynamiques'); ?></option>
|
||||
<?php foreach ($tags as $tag) : ?>
|
||||
<option value="<?php echo $tag->slug; ?>"><?php echo $tag->name; ?></option>
|
||||
<option value="<?php echo $tag->slug; ?>" <?php selected($etiquette_active_filter_slug, $tag->slug); ?>><?php echo $tag->name; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user