Hooks Only in Posts

Community Forums Forums General Discussion Hooks Only in Posts

This topic is: not resolved

Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  Davinder Singh Kainth 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #76355

    psvj
    Member
    Post count: 5

    Hey everyone-

    Is there a way to get a hook to ONLY show up when viewing a post page?

    i.e. not when looking at a category page, or a blog page— only when looking at a SINGLE post?

    I am trying to use hooks to at adsense to the bottom of all of my posts– but cannot get it to work without going like 100 ads at the bottom of every post summary on a category / blog page.

    thanks for the help

    #76362

    Davinder Singh Kainth
    Participant
    Post count: 1298

    This tutorial should help you – http://www.basicwp.com/add-adsense-ads-genesis-single-posts/


    Need website customization services or other Genesis / WordPress help ?
    Davinder @ Design Studio iGuiding Media | My Blog | Fresh Genesis Themes Collection

    #76390

    psvj
    Member
    Post count: 5

    Thanks !

    i ended up finding this snippet of code- which did the trick–

    /* Filter the_content() */
    add_filter( ‘the_content’, ‘my_content_filter’ );

    function my_content_filter( $content ) {
    if ( is_single()) {
    $content .= ‘ insert content ‘;
    }
    return $content;
    }

    #76528

    Davinder Singh Kainth
    Participant
    Post count: 1298

    Welcome !


    Need website customization services or other Genesis / WordPress help ?
    Davinder @ Design Studio iGuiding Media | My Blog | Fresh Genesis Themes Collection

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

You must be logged in to reply to this topic.