Try using the post
variable to access the post_title
global $post;
$s = $post->post_title;
echo substr($s, 0, strrpos($s, 'on') - 1);
Try using the post
variable to access the post_title
global $post;
$s = $post->post_title;
echo substr($s, 0, strrpos($s, 'on') - 1);