feat: add search functionality to article archive
Split the article archive filters into two columns. The left column now contains the publication status filter, while the right column introduces a new search bar for querying articles. This improves user experience by allowing more precise and convenient filtering of articles. No visual changes are made to the existing filter functionality.
This commit is contained in:
parent
d87996372e
commit
ac0a7eb942
1 changed files with 13 additions and 4 deletions
|
@ -4,9 +4,9 @@
|
|||
<section class="container my-5">
|
||||
<h1 class="display-4 text-center">Articles</h1>
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-12">
|
||||
<form method="GET" action="" class="form-inline justify-content-center">
|
||||
<div class="form-group mx-sm-3 mb-2">
|
||||
<div class="col-md-6">
|
||||
<form method="GET" action="" class="form-inline justify-content-start">
|
||||
<div class="form-group mb-2">
|
||||
<label for="publication_status" class="sr-only"><?php _e('Publication Status', 'duck-behavior-journal'); ?></label>
|
||||
<select name="publication_status" id="publication_status" class="form-control" onchange="this.form.submit()">
|
||||
<option value=""><?php _e('All Statuses', 'duck-behavior-journal'); ?></option>
|
||||
|
@ -22,7 +22,16 @@
|
|||
?>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary mb-2"><?php _e('Filter', 'duck-behavior-journal'); ?></button>
|
||||
<button type="submit" class="btn btn-primary mb-2 ml-2"><?php _e('Filter', 'duck-behavior-journal'); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<form method="GET" action="" class="form-inline justify-content-end">
|
||||
<div class="form-group mb-2">
|
||||
<label for="s" class="sr-only"><?php _e('Search', 'duck-behavior-journal'); ?></label>
|
||||
<input type="text" name="s" id="s" class="form-control" placeholder="<?php _e('Search', 'duck-behavior-journal'); ?>" value="<?php echo get_search_query(); ?>">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary mb-2 ml-2"><?php _e('Search', 'duck-behavior-journal'); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue