Jonathan,
Wow I must have had a long day yesterday and didn’t even spot that you had already answered my question. Your second point was key and alludes to my failure to understand the key difference between the_title()
and get_the_title()
. Thanks for taking the time to help me out.
For the benefit of others:
the_title()
echos out the title of the current post to the frontend.
get_the_title()
however returns it as a variable, but does not echo it out