Forums

How to get the ID for a specif permalink (2 posts)

  1. altrugon
    Member
    Posted 3 years ago #

    Hi there,

    I'm trying to get the ID for each of my page so I can use it in another function, but all that I've read is how to get the ID inside the loop or for the actual post/page.

    Here is my problem, having the following:

    <ul id="menu-pages">
      <li class="page_item page-item-4">
        <a title="Home" href="http://mysite.com">Home</a>
      </li>
      <li class="page_item page-item-6">
        <a title="Portfolio" href="http://mysite.com/portfolio/">Portfolio</a>
      </li>
      ...
    </ul>

    How can I get the ID for each of those pages. I see know that the last class of the li has the id, but is there another way?

  2. Evita
    Member
    Posted 3 years ago #

    Dashboard/Manage/Pages - hover over the titles and look on your status bar, there must be something like YOURSITE/wp-admin/page.php?action=edit&post=XX - where XX stands for your page ID.

Topic Closed

This topic has been closed to new replies.

About this Topic