I want to achieve a post page that has filtering just like this enter image description here
Here is my code in my index.php file its only a grid display of all my post, how can achieve this look and function?
<?php if ( have_posts() ): ?>
<h1>
<?php echo __('Latest Updates', 'wp_babobski')?>
</h1>
<?php while ( have_posts() ) : the_post(); ?>
<div class="col-md-4 gy-2 gx-5 pt-3 pb-3 px-3">
<div class="newspage">
<img class="img-fluid rounded" src="<?php echo get_the_post_thumbnail_url(); ?>" >
<h5 class="heading pt-2 pb-2">
<a class="newstitle" href="<?php esc_url( the_permalink() ); ?>" title="<?php the_title(); ?>" rel="bookmark">
<?php the_title(); ?>
</a>
</h5>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?>" class="btn btn-secondary">Read More</a>
</div>
</div>
<?php endwhile; ?>
<?php else: ?>
<h1>
<?php echo __('Nothing to show yet.', 'wp_babobski')?>
</h1>
<?php endif; ?>
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<?php
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
?>
</ul>
</nav>