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

  1. PChuprina
    Posted 3 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.


  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
    Posted 3 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
    Posted 3 years ago #

    Thank you all!

Topic Closed

This topic has been closed to new replies.

About this Topic