Want to block adsense middle ad in video category

Discussion in 'PHP' started by ummi, Dec 11, 2012.

  1. #1
    Hi,

    I want to disable adsense middle ad in just my video category(category tag is 3) because it is disturb my video alignment. support was show the of tutorial text but i can't understand so kindly le me know the php code and where i can post it?

    Support source code
    asd.JPG

    Sample link of video post: http://pakistanibacha.com/saeen-tou-saeen-version-2/
     
    ummi, Dec 11, 2012 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    The php code depends on the code on your site. What you were given (the directions in the blue box) is about as specific as it can get without someone reading your php file. (The fact that you're using code written for Wordpress on a site that's not Wordpress might also have something to do with your problems.)
     
    Rukbat, Dec 11, 2012 IP
  3. ummi

    ummi Active Member

    Messages:
    383
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Sorry dude, I cant understand that what to you. my site make by wordpress.
     
    ummi, Dec 11, 2012 IP
  4. ummi

    ummi Active Member

    Messages:
    383
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    Sorry bro! I cant understand that what you want to say. My site make by wordpress.
     
    ummi, Dec 11, 2012 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    Then just put

    <!--noadsense-->

    anywhere in a post you don't want the ad to appear. (It won't show when you read the post.)
     
    Rukbat, Dec 11, 2012 IP
  6. ummi

    ummi Active Member

    Messages:
    383
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #6
    Hi Rukbat,

    Thanks for your reply, but i want to block the middle ad from whole video category. when i post a new video then ads automatically disable... and I think <!--noadsense--> code for all ads but i want to remove just middle one.
     
    ummi, Dec 11, 2012 IP
  7. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #7
    Then you're going to have to define a custom field with a key of adsense-middle and a value of no. Then somehow (probably pay someone write some code for you) have that field automatically inserted into posts made in the video category.
     
    Rukbat, Dec 11, 2012 IP
  8. ummi

    ummi Active Member

    Messages:
    383
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #8
    You can't make this code for me?
     
    ummi, Dec 11, 2012 IP
  9. Wordpress%20Wizard

    Wordpress%20Wizard Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Simple Solution, use jQuery to set your adsense display : none.
     
    Wordpress%20Wizard, Dec 12, 2012 IP
  10. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #10
    Not something I can paste here, because you wouldn't know where to put it. And if I have to go to your site, I have to charge you, and I'm not here looking for paid work.
     
    Rukbat, Dec 12, 2012 IP