Hello friends, welcome to my another blog post how to get page id from page name WordPress. If you have your page name or page title and you need to find page id from that, WordPress does not have any default function for that. Where you pass the page name or page title and get your respective page id. Here I create a custom function for you to get page id from page name and page title. You can use my function with wp_list_pages WordPress function to be excluded from the list of pages or included your specific page.

Get page id from page name(page alias) WordPress





Use of the above function

Suppose your ‘about-me’ page id=8, ‘contact-me’ page is=11, ‘hire-me’ page id=16 then you have 8,11,16 in $pageid variable.
Now the actual use is given below :

Get page id from page title WordPress

Use of the above function

And the rest of the task is same as getting page id from page name(page alias) WordPress section.

Thank you for your time. Now you know how to get page id from page name WordPress. Please comment below if you have any issue.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
How to get page id from page name wordpress
Tagged on: