I have an url that looks like this http://apploadny.appload.nu/tjanster/webbutveckling/ I want to get the ID of the page "tjanster", how can i do that?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
I think what you need is:
For more info check: http://codex.wordpress.org/Function_Reference/get_post_ancestors |
|||||||
|
|
I think a better solution than @alexleonard 's is to use the
Haven't tested that, so make sure you check for spelling mistakes and such. |
|||||
|