WordPress.org

Ready to get started?Download WordPress

Forums

Using page id's, finding page id's? (4 posts)

  1. PChuprina
    Member
    Posted 2 years ago #

    Hello all,

    In my installation of wordpress I'm using the "post name" permalinks system.

    In a file I'm trying to modify I'm using if(is_page(array(x,y)) ) with x and y being the page id's. Can I use the pages permalink name as a page id? If not do I have to use page id numbers, if so how would I find them now with permalinks set on "post name?"
    Thanks for any help.

    PChuprina

  2. Depending on what browser you are using, the page ids show up when you hover over the page titles in that bar at the bottom left of your screen - sorry, I always forget what that damn thing is called.

    Of course, this can be improved though and this plugin makes it easy.

  3. kitchin
    Member
    Posted 2 years ago #

    The codex says you can use slugs: http://codex.wordpress.org/Function_Reference/is_page
    Another quick way to get the ID is to click edit and look at the URL.

  4. PChuprina
    Member
    Posted 2 years ago #

    Thank you all!

Topic Closed

This topic has been closed to new replies.

About this Topic