Adsense
-
Hi Everyone,
I have found an illegal ad on my website and would like to remove it.I am not sure what part of the code to remove. I am new to wordpress so speak in lay – womans 🙂 terms if possible 🙂
mylocalbusinesssupport.com.au
I have had a google and tried to do myself but I am still struggling.
Cheers
Chuckles
-
Could it be this?
<div style=”margin-top:10px;margin-left:-420px;”>
<!– ads –>
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– ads –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:336px;height:280px”
data-ad-client=”ca-pub-9005455344250146″
data-ad-slot=”2886375312″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>Hi chuckles70,
the code you’ve identified is from Google Adsense.The owner of the Adsense account earns money by displaying targeted ads on your site/page for each click.
If you or your team placed it in there, you can safely remove it from the WordPress backend (home landing page of your site).
If it’s not there, you might want to have a look at the widgets (footer?) or find it via editor.
Good luck!
DenisThanks Denis for replying.
Cheeky buggers! 😉
Ok so if my understanding is correct – I need to delete it from my Cpanel where all the files hangout?
How would I find it with the editor? I searched for it manually so if there’s an easier way of sifting through the code?
Is there a way to learn how the files are setup in wordpress or a set standard I can refer to?
Thanks again
ChucklesNothing to do with cPanel – It’s all in your WordPress website. There are a few areas where this code might be located. Let’s get through them one by one.
Log onto your WordPress via wp-admin/, then
1. Homepage
View your page that is currently assigned to the homepage. Scroll to the bottom of the page, and see if you can find this (remove it if you do):<div style="margin-top:10px;margin-left:-420px;"> <!-- ads --> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- ads --> <ins class="adsbygoogle" style="display:inline-block;width:336px;height:280px" data-ad-client="ca-pub-9005455344250146" data-ad-slot="2886375312"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div>2. Theme Editor – footer.php
Go to the editor and find the footer.php file. Remove the code if it’s there.3. Sidebar/Widgets
Go to your widgets section, and view all enabled widgets. Remove the code if it’s there.Thanks Denis…
Okay I have read your advice about 5 times now… eyes glazing over – head hurting – not your comments but my lack of knowledge and confidence in wp!
Okay see if Im on the right road!!
Home Page checked – Found nothing
Theme Editor –
I have found it I think in the Footer Editor. Do I just delete it out of that screen. Is that okay to touch? Im not sure where the code starts and stops? Is it only just the code that is in bold below?
<?php
/**
* @package WordPress
* @subpackage Aegaeus
*/global $data;
?>
<?php if ( !is_attachment() ) { ?>
<?php if ( comments_open() ) { comments_template(); ?>
<div class=”spacer”></div>
<?php } ?>
<?php } ?><div style=”margin-top:10px;margin-left:-420px;”>
<!– ads –>
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– ads –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:336px;height:280px”
data-ad-client=”ca-pub-9005455344250146″
data-ad-slot=”2886375312″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<?php if ( !page_has_sidebar( get_the_ID() ) ) { ?>
</div>Sidebar/Widgets
I have checked the widget section and there doesnt seem to be anything lurking 🙂Okay let me know when you get a chance please?
Thanks again
WP Learner!!
The topic ‘Adsense’ is closed to new replies.