I’m currently looking for a way to find the Title of the current post/page you’re on, without it auto echoing the way that the_title(); does. Also, I don’t think get_the_title() is suitable as you’ll need to give that an ID (of the post/page) and I don’t think I can retrieve that without first using the ‘loop’?
Any advice would be much appreciated chaps!
You should always have access to the current post/page’s ID. Normally it’s $post->ID globally.
get_the_title()
is definitely the solution you’re looking for.