Hi, I want to add custom code in the space between the top menu bar and the title of the post. I have tried the following code in my child theme:
add_filter (‘the_title’, ‘add_AdToTitle’, 11 );
function add_AdToTitle ( $title ) {
$Ad = do_shortcode(‘MY CODE’);
return is_singular(‘post’) ? $Ad.$title : $title;
}
But that puts the added content inside the H1 tag. Not good. I also tried to change “the_title” to “the_content” but that puts my code below the featured image of the post and above the content. Not what i want.
Any ideas?