WordPress 3.0
I want to have the contents of a specific post into a page by using the title
of the post. As far as I can tell, I can’t do it directly with get_post()
.
I can assume what the brute force way might be, but I suspect there’s a more elegant way?
There ye go.
No need to SQL query’s when you can use wordpress own functions for this.
post_exists is a good function for that :
https://developer.wordpress.org/reference/functions/post_exists/
See my answer on a very similar question. Do not query the data base with an unescaped string.
You can use this:
1)
or 2)