I want to make a custom query that checks the post title and puts in a different URL like this:
<a href=bing.com/search?q=<?php echo single_post_title(); ?>>Blablabla</a>
But it does not work for me if I have a post with a space in it, like
Hello World. Then it only shows me
Hello in the link. How can I get the full post title?
I tried this too, but did not work, just like the first one.
<?php $titletest = get_the_title(); echo " <a href=http://www.bing.com/search?q=$titletest>$titletest</a> "; ?>