Add class to WordPress post in the loop
You can use the post_class filter to add a class to the WordPress post in the loop if you are using the post_class function. If you want to add a post class to your post in the loop, simply add the following code in your loop. But sometimes you don’t…