Get permalink by post title
-
My question is very simple:
Looking to get the permalink of a post using it’s title. Basically trying to accomplish something that would work like “get_permalink(‘Title of Post’)”.
When I use “get_permalink(‘100’)”, for example, all it does is output https://www.mysite.com/?p=100, which is especially worthless since I’m using pretty permalinks.
The reason I can’t just put the link into the post directly is because it will be supplied conditionally by a custom meta field.
Any thoughts?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get permalink by post title’ is closed to new replies.