Determain if a content is either a "Page" or a "Category" by the ID
-
I could be wrong, but Pages and Categories do not share the same ID. I am writing a function where depending on the type of content, it displays a certain loop. I am trying to make it easier for the user so instead of making the user tell weather its a “Page” or “Category”, I was hoping the function can figure it out just by the ID that the user submits.
Example:
if ID#1 is a category, do X
if ID#1 is a page, do yIs this possible?
- The topic ‘Determain if a content is either a "Page" or a "Category" by the ID’ is closed to new replies.