Page ID from Page Name
-
Hello All!!
I am working with the following code: https://pastebin.com/n4MbfNwY, which is in my functions.php
Basically, it gives me the ability to return the page id from a page name.
I have the following code in my template: https://pastebin.com/BgM0GqzH.
This code works, for the most part. It seems the code doesn’t work when I have a page that’s more than one word. In other words…the pages named “Flower”, “Pot”, or “Plant” will all work correctly…the pages named “The Flower”, “Your Pot”, or “My Plant” will not work at all.
Any ideas?
Thanks,
Josh
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Page ID from Page Name’ is closed to new replies.