1
vote
2answers
564 views

Get closest page ID from URL

Lets say on my WordPress website I navigate to: www.example.com/media-centre/news/17/an-example-news-post In this case I am looking at a post in a CPT called News. What I want to do is get the ...