why post_class() function apply css classes to all other files?

I use the post_class() function to add a custom class of CSS like width and display property. But it applied to all other files like the about page, contact page. I tried to use the WordPress class instead of using the class attribute of HTML. I have referred wordpress.org. I thought post_class can use for WordPress predefined class and also for adding custom classes. It’s a right or wrong method. Please suggest if anyone knows, where to use the post_class()? and it is ok to use post_class() for adding custom classes.

Is it possible to update the total price on the checkout page in woocommerce from a custom field

I would like to know how I go about this. Let’s say I have some items in my checkout page in woocommerce. I want to apply a gift card to the order, I can’t use a gift card plugin because it is implemented already by a third party gift card service. Someone is building the connection for me to hit to connect to the third pary gift card service.

How to get the Page Name of the current page?

On mobile, I want to display what page my users are on. I have 6 top pages at the moment.
Home, Projects, Blog, Contact, Privacy Policy and Impressum. Both Projects and Blog have posts in them. Projects is a custom post type as well.
When a user clicks on Contact, title should change to contact. If they go to Project and click on a post, the title should say projects. I hope I make it clear.
I don’t mind working with if statements either if that’s a solution.

Why is my Custom Post Type not showing up after adding capabilities?

I’m trying to add a custom post types with capabilities, so a custom user role can do certain things with them. Eventually the custom role is a Client, and the post a Website, and I want clients to be able to log in and view their websites. However, the post type is not showing up as soon as I add capabilities => 'website'. Why is is not showing up? I was following this tutorial and here it seems to work at 3:54 (with vehicles as a custom post type).