|
#1

Jun 26, 2010, 11:47 PM
|
|
How can I add Adsense to JUST my TAG Pages and Categories Pages?. I would like to place it above the fold and in the center. Thanks. Love the theme.
John
|
#2

Jun 27, 2010, 12:22 AM
|
|
Also I would like to add it to the Homepage. I don't want it to show on the posts. I figured it that it needs to go into "The Loop" but it is coming up on my post pages and I don't want that.
|
#3

Jun 27, 2010, 10:21 AM
|
|
Hmmm...my immediate thought is to create a new widget area there, but I'm not sure how to restrict it to certain pages like can be done with the left and right sidebars in the "Style and Configure Sidebars" area.
Velma
|
#4

Jun 27, 2010, 07:31 PM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Put it in the'Above the loop' area and wrap it in a php if statement. You can use the is_category() and is_tag() functions in the 'if'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5

Jun 27, 2010, 07:54 PM
|
|
Hey juggledad! I am a complete noob. I know nothing about PHP. How would that look?
|
#6

Jun 28, 2010, 11:28 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
try this
HTML Code:
<?php if (is_category() or is_tag()) { adsense code here } ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7

Jun 28, 2010, 02:28 PM
|
|
Is this how it is suppose to look??
<?php if (is_category() or is_tag()) { <script type="text/javascript"><!--
google_ad_client = "pub-4544333633484176";
/* 728x90, created 6/20/10 */
google_ad_slot = "8303439851";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>} ?>
I keep getting this error: Parse error: syntax error, unexpected '<' in /home/paragone/public_html/wp-content/themes/atahualpa351/functions.php(532) : eval()'d code on line 7
I also would like to apply this code to my HOMEPAGE. So would I throw a "IF" statement in for that also? Thanks a million
John
|
#8

Jun 28, 2010, 03:19 PM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
8you can't mix php and html without being very careful. put all the html in an echo 'code goes here';
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#9

Jun 28, 2010, 05:35 PM
|
|
I am lost "Echo"?? I googled it. Still at a lost. It's not coming up on my "Homepage" either. How is it exactly suppose to look?? The whole code. I would be willing to make a donation, if I can just send you my email and password. I will be here till hell freezes over when I figure it out.
|
#10

Jun 29, 2010, 05:22 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
try this, it should display th ad on a category page, a tab pag and the home page but only the first of the home pages.
HTML Code:
<?php if (is_category() or is_tag() or (is_front_page() and (!is_paged())) { echo '<script type="text/javascript"><!--
google_ad_client = "pub-4544333633484176";
/* 728x90, created 6/20/10 */
google_ad_slot = "8303439851";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>'; } ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11

Jun 30, 2010, 12:08 AM
|
|
It keeps giving me this error. I am taking the EXACT code. Copy and Paste and it is still giving me a problem.And it is still showing on where I post my individual articles (On their own page) which I dont want ....
This is my site: http://paragonesystems.com/
This is where I DO NOT want the ads to come up. On individual posts like these: http://paragonesystems.com/top-flori...ctions-part-2/
Parse error: syntax error, unexpected '{' in /home/paragone/public_html/wp-content/themes/atahualpa351/functions.php(532) : eval()'d code on line 7
Thanks again for taking the time and really caring about helping me out. I really appreciate it. Thanks a million.
John
|
#12

Jun 30, 2010, 05:20 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
oops, one extra open paren change '(!is_paged()))' to '!is_paged()))'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#13

Jun 30, 2010, 11:47 PM
|
|
OOOOO YEEEAHHHHHH... Great job!! It finally worked. Thanks for the amazing support!!!    Thanks for going above and beyond. Keep up the amaaaaazzziinnnggggg work!!!
John
|
|