WordPress.org

Forums

Is there a function or tag to get the page id? (4 posts)

  1. luckymh
    Member
    Posted 10 years ago #

    I don't know if there is a function or tag that can retrieve the id of some page, given the page's title or name as input parameter.

    Thank you.

  2. James Huff
    Support Representative
    Posted 10 years ago #

    I am 79.5% sure that this is what you're looking for:

    http://codex.wordpress.org/Template_Tags/the_ID

  3. luckymh
    Member
    Posted 10 years ago #

    You are right. it's useful for the moment. Thank you!!!

    I'm still wondering why this the_ID does not have any paramenter. What if I want to refer to another post id when I'm in this post?

  4. James Huff
    Support Representative
    Posted 10 years ago #

    What if I want to refer to another post id when I'm in this post?

    Link to it with a hyperlink?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags