This article fits all WordPress themes.
When you write a CSS for a special Page or Post. It is necessary to add a unique class name for the CSS. Or the CSS will affect other pages without the class name. The class name will be exported on the <body>
tag by WordPress theme.
The class name format looks like for a Page: page-id-4804
The class name format looks like for a Post(Portfolio): postid-3191
But how to find the ID?
- Login wp-admin, go to Pages(or Posts) > All
- Move the mouse cursor to a page(or Posts) title, there will be a URL shown on the bottom status bar of the browser
- You will see a number like the 613. It is the ID
