Can't get genesis_before_post_content hook to work

Community Forums Forums Design Tips and Tricks Can't get genesis_before_post_content hook to work

This topic is: not resolved

This topic contains 1 reply, has 1 voice, and was last updated by  hominid 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12062

    hominid
    Participant
    Post count: 1

    Hi,

    I’m trying to mass add adsense before the content of all of my posts.  I added a php file called “adsense-post.php” that includes <div>”my adsense code”</div> in the file.  I added it to my Lifestyle child theme directory.  Then I added the following code to my Lifestyle child theme functions.php file:

    add_action(‘genesis_before_post_content’, ‘include_adsense_post’, 9);
    function include_adsense_post() {
    if ( is_single() )
    require(CHILD_DIR.’/adsense-post.php’);
    }

    The combination of the new adsense-post.php file and the functions.php edit isn’t working.  What am I doing wrong?

    Thanks,John

    #12384

    hominid
    Participant
    Post count: 1

    Anyone have any ideas?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.