get_page_by_title works fine on plain text title. but when it comes to smart quotes and symbols like #
it doesn’t work. It fails to find post with the given title.
For Example:-
get_page_by_title('The #1 Reason to Buy Right Now – THE MONEY!!', OBJECT, 'post');
returns NULL
.
But there exists a post with this title. If there is a better way to do so, then that would be great.