Add a custom class name to post_class()
If you are a WordPress theme developer ya may have ran into the need of adding custom class names to your posts. As you know WordPress normally inserts a lot of class names for posts, pages, categories, and custom post types. But in some situations, you´d prefer to add your own specific classes to target them in your CSS styles.
Adding custom classes is really easy. WordPress uses the post_class() function, which you can also use to add a new class name to the default WordPress classes.
As you can see we are passing the parameter ‘movies’ through the native WordPress post_class() function. You can name your class names anything you want.
This is how it actually looks like inside posts loop. You can customize everything to you liking.