Forums

How to get page ID when using name/date permalink (2 posts)

  1. drumz
    Member
    Posted 1 year ago #

    I am using an exclude so only certain pages show on the top nav of my theme. <?php wp_page_menu ('show_home=1&depth=1&title_li=&exclude=26,67,69,71,73,77,79,81,83,85'); ?>
    I currently have the site set to name/date for permalinks so when I create this new page that I want excluded I get the name and not the ID which is only what the exclude will accept.

    So my question is how do I get the page ID when set to view permalinks as name/date? Maybe the only way is to switch permalinks to the default and then back again but I don't want to possibly have it change the page ID's...
    Thanks in advance for your assistance.!

  2. drumz
    Member
    Posted 1 year ago #

    Never mind, all you have to do is look in the URL when editing the page and low and behold, the page ID. Also, if you switch the permalinks to the default and then back again all the original links work fine.

Topic Closed

This topic has been closed to new replies.

About this Topic