I have added an adsense share function to my WPMU/BP site. I am using the T2 method of adding an adsense unit to show on only the first post on the index page.
Call php function inside of echo function
20
I have added an adsense share function to my WPMU/BP site.
I am using the T2 method of adding an adsense unit to show on only the first post on the index page.
found here WordPress - add Adsense to your blog
These two parts are used to define and show adsense only on the first post
1st part
2nd part
Now inside of the second part you will notice after google_ad_client =. What this is doing is showing as is when i am viewing the page source. I believe it to be because of a function inside of a function.
My question is would anyone know of a fix for this or is this something that doesnt have a fix.
Thank you
I am using the T2 method of adding an adsense unit to show on only the first post on the index page.
found here WordPress - add Adsense to your blog
These two parts are used to define and show adsense only on the first post
1st part
Code:
<?php $postnum = 1; $showadsense1 = 1; ?>
Code:
<?php if ($postnum == $showadsense1) {
echo '
<script type="text/javascript"><!--
google_ad_client = <?php get_adsense_code(); ?>;
/* xxxxxxxxxxxxxx */
google_ad_slot = "xxxxxxxxx";
google_ad_width = xxx;
google_ad_height = xxx;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
';
} ?>
<?php $postnum++; ?> Now inside of the second part you will notice
Code:
<?php get_adsense_code(); ?>
My question is would anyone know of a fix for this or is this something that doesnt have a fix.
Thank you
- mywebwork
- [ 1 ] Thanks
- [1] reply
- PlumGreekMob
- mywebwork
- [ 1 ] Thanks
- [1] reply
- PlumGreekMob
- mywebwork
- lisag
- [ 1 ] Thanks
- mywebwork
- [ 1 ] Thanks
- [2] replies
- lisag
- [1] reply
- PlumGreekMob
- PlumGreekMob
- mywebwork
- [ 1 ] Thanks
- [1] reply
- PlumGreekMob
Next Topics on Trending Feed
-
20