Simple hooks and adsense

Community Forums Forums General Discussion Simple hooks and adsense

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  braddalton 1 year ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #54057

    kappienl
    Participant
    Post count: 2

    Simple hooks is a great way to include a adsense block to single posts. But when i use it it also show the blocks at the category or archive pages. And with adsense only showing 3 blocks at the max i get al lot of white spaces. I know there is a way to show the adsense block only at posts and not at the archive but how do i do that ?

    Thanks

    #54067

    braddalton
    Participant
    Post count: 9192

    You can use code this like with a conditional tag for single posts and modify it:

    Change the hook and conditional tags if needed.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #54090

    braddalton
    Participant
    Post count: 9192

    Remove this:
    [php]
    && has_tag(‘custom’)
    [/php]

    Or tag the posts you want to display Adsense on using a tag named custom.


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

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

You must be logged in to reply to this topic.