remove hooked ad on single page

Community Forums Forums Design Tips and Tricks remove hooked ad on single page

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  braddalton 6 months, 2 weeks ago.

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

    stepheniryna
    Participant
    Post count: 16

    Google requires 404 pages to be ad-free. I have hooked a site-wide 729px ad in genesis_before_loop. How do I remove it on my 404 page (or anywhere else for that matter)?

    http://goldbuyeru.com
    #65507

    braddalton
    Participant
    Post count: 7473

    What code did you use to hook it in?

    You can add the conditional tag to exclude it from 404 pages.

    Please copy the code from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++

    https://gist.github.com/braddalton/90943b4f5231ab6cfb18


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #65527

    stepheniryna
    Participant
    Post count: 16

    Thanks Brad.

    Dynamik has a custom css area which includes conditionals functionality. I added ! is_page(874) && ! is_page(908) which adds the ad on all pages except 404 page (which is set up with a php redirect) and my google custom search results page.

    Thanks for the help.

    #65549

    braddalton
    Participant
    Post count: 7473

    Interesting. Will have to take a look at some stage.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

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

You must be logged in to reply to this topic.