How to add adsense after title in post but not in Home page.

Community Forums Forums Design Tips and Tricks How to add adsense after title in post but not in Home page.

This topic is: not resolved

This topic contains 6 replies, has 3 voices, and was last updated by  Mitz 1 year ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #25794

    prabir
    Participant
    Post count: 6

    I added adsense code in post after title through genesis Simple Hooks plugin but it also showing on home page. I dont want t show ads on home page. how to do that, plz help me .

    #25797

    braddalton
    Participant
    Post count: 9446

    Link to your site please.

    You would add a conditional tag to exclude the home page and archives or use CSS to hide it.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #25801

    prabir
    Participant
    Post count: 6

    here is the Link idea66.com

    Could you plz provide the code and the instruction on how to use.

     

    Thanks

     

    #25802

    braddalton
    Participant
    Post count: 9446

    Please paste the code you added in Simple hooks here please


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #25803

    braddalton
    Participant
    Post count: 9446

    Paste this in the hook field for genesis after post title
    [php]
    <?php if (is_single() ) { ?>
    <p>Adsense-Code-Goes-Here</p>
    <?php } ?>
    [/php]


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #25807

    prabir
    Participant
    Post count: 6

    It is working now.

    Thanks a lot for your help and your code.

    Thank you again

    #60129

    Mitz
    Participant
    Post count: 5

    hi there
    I have come from thesis and I was using this to add adsense but not on certain pages:

    if (!is_page() && !is_single( array( 13406,5526,1025,14717,991,649, ) )) {

    it is added to the genesis_entry_header hook spot 12.

    It all works fine on the single posts but shows on the homepage too…

    site


    I build WordPress websites that make money. That’s it!

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

You must be logged in to reply to this topic.