How to get the ID for a specif permalink
-
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="https://mysite.com">Home</a> </li> <li class="page_item page-item-6"> <a title="Portfolio" href="https://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?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to get the ID for a specif permalink’ is closed to new replies.