Need variable that returns Page ID
-
I’m using a rather silly “hack” for my page (which is not really a hack; it’s just my way of circumventing the fact that I know next to nothing about coding in PHP).
Each category of my blog displays using a different background color; I did this with a simple:
<?php if (in_category(1)) { echo '<div class="category1">'; } ?>
Now I want to do the same thing for my pages, but I can’t find a value like “in_category” that returns the value of the page. If I had that, I could just do a:
<?php if (THE_BLEEDIN'_PAGE_ID(1)) { echo '<div class="category1">'; } ?>
but I can’t find a variable that returns the page id value. Hilfe, bitte!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Need variable that returns Page ID’ is closed to new replies.