I am looking to implement a filtering system for blog posts using hashtags.
This feature should display only the blog posts with matching hashtags and move them to the top of the page. Additionally, there should be a button at the top to show all posts.
I attempted to use a tutorial from W3Schools (https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_portfolio_gallery_filter), but it seems to be causing interference with the layout of the blog posts due to the use of display:none and display:block classes.
Below is an example structure of an individual blog post:
<div><!--Hide/Show based on hashtag-->
<div> <!--Blog Post-->
<div> <!--Blog Content also Hide/show-->
<div>
<!--blog content 1-->
</div>
<div>
<!--blog content 2-->
</div>
<div>
<!--blog content 3-->
</div>
<div><!--blog pagination--></div>
<div><!--#Hashtag id--></div>
</div>
</div>
</div>