post_class or post_id?
-
Hey folks,
So I am designing my first theme but I have run into a little confusion.
I am setting up my index.php file and I am trying to insert the php tag that calls out the CSS for the div that contains my post area.
In my HTML rough, I have the post area selected via ID, like div#postarea. That would be the correct way to do it right? I was under the impression that classes are for multiple occurring elements and the post area only occurs once on a page so, therefore, I should use an ID?
The problem is that I don’t see a tag in the WordPress codex that calls upon an ID for the post area, there is only one for class: https://codex.www.ads-software.com/Template_Tags/post_class
Also, I was wondering if anyone could direct me to a list of necessary tags and explanation of each. I am still a little unclear as to how WordPress knows which ids and classes (which you name) are used with the php integration for the template. Are all of your div names ‘registered’ or something like that in the functions.php file?
Thanks..
- The topic ‘post_class or post_id?’ is closed to new replies.