Forums

Determain if a content is either a "Page" or a "Category" by the ID (1 post)

  1. sputnick3k
    Member
    Posted 7 months ago #

    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 y

    Is this possible?

Reply

You must log in to post.

About this Topic