I've got a simple bit of code which seems on the category page (same with_category() could be true):

$p = wp_title('',false);
$q = 'About Us';
echo $page->ID;

I'm attempting to grab this content of the page according to it getting exactly the same title/title like a category, which works fine.

Line 1 here access the course title. This works and when you echo $p then you definitely get 'About Us' as you'd expect (begin to see the paperwork which false argument causes it to be to be used in PHP, an easy string). Initially the code then had $p because the argument for get_page_by_title() which does not work. Switching it to $q works. I have attempted typing $p to string which does not work.

I have got not a clue why this does not work, any ideas could be appreciated.