Header already sent usually means that there is a blank line at the bottom of functions.php
|
this plugin solves all the adsense problems - it's great:
Whydowork Adsense If you're working with wordpress, you can just upload it. Otherwise, just google for it. I can put adsense just about anywhere I want. |
Hi,
(My first post - I'm a new blogger with some programming experience. I love the theme and the active support on the forum.) I have the same problem as adum #33 and river #34 above - when I make the addition to functions.php things get messed up: Parse error: syntax error, unexpected '=' in /home/MYUSERNAME/public_html/MYBLOG/wp-content/themes/atahualpa/functions.php on line 533 Here's a part of my functions.php with line numbers added: PHP Code:
PHP Code:
However, if I skip the assignment it won't result in an error: PHP Code:
I guess this is why I never will be a great programmer, there is nothing that makes me as frustrated as this. |
try this
HTML Code:
533 $adsense_ad = '<div class="bfa-adsense"> |
I am also experiencing the problem with "parse error" when I try to modify functions.php. I have just upgraded to Atahualpa 3.4.1. When I put in the code (exactly as shown without any spaces, etc., or modifications to anything else), it breaks my blog. I couldn't even get into wp-admin to fix anything. Thank goodness I backed up my complete folder that holds my blog via FTP. I tried another suggestion to delete the Atahualpa folder from themes (which it was said should default back to default template), but my blog was still not showing. The only thing that worked was to re-upload via FTP my saved blog folder and overwrite the contents. I am not asking for any help with this, I just wanted to add in that I have experienced the same problem. The really frustrating thing is that I copied and pasted the contents of functions.php into a notepad, in case the added code caused a problem, so I that I could copy/paste back in EXACTLY what was there originally and it didn't help. I even went to another blog I have that uses atahualpa and copied out the functions.php but no dice. The only thing that worked in the end was to re-upload my saved blog folder. I've already deleted and re-uploaded twice today, guess I'll be waiting on getting Adsense to the byline area of my single posts.
|
BTW, I decided to try the Whydowork Adsense plug-in. I have it working now, it was very easy to install. Just be sure you click on "show adsense to administrator" while working on it, or you won't be able to see if it's working!!
|
Quote:
PHP Code:
PHP Code:
I put some extra conditions, to only put these ads in the content if the post is over a month old. I did that with this: Replace PHP Code:
PHP Code:
|
Hi all!
I'm new to this theme and this is my first post in thes forum. I'm trying to add Adsense to the home page of my blog. I don't like to use a plugin for Adsense, and I've added the code to functions.php plus that little piece of code in CSS inserts, and that's working great for posts. I've tried some of the suggestions here, but can't get anything to work. I did get Adsense to show up on pages, which I don't want. I just want it to be on single posts and the home page. Any advice is greatly appreciated! :) |
This post was originally opened when Atahualpa waas at version 3.2 - it's now at version 3.4.6 with some major changes. One of them is the option 'The LOOP' in the 'Style & edit CENTER COLUMN' area.
you can do all sorts of things here and pretty muck eliminate most of the changes to the code (like function.php) and save yourself having to make those changes again at the next release. By putting in some simple php logic in the 'Content ABOVE the LOOP' you could have your AD show up at the top of the center area before the posts HTML Code:
<?php if (is_single() or is_front_page()) { ?> <div class="bfa-adsense"> |
NOTE: if you got the error
HTML Code:
Parse error: syntax error, unexpected '=' in /home/djembata/public_html/formula1/wp-content/themes/atahualpa/functions.php on line 669 HTML Code:
adsense_ad = '<div class="bfa-adsense"> HTML Code:
$adsense_ad = '<div class="bfa-adsense"> |
NOTE: if you got the error
HTML Code:
Parse error: syntax error, unexpected '=' in /wp-content/themes/atahualpa/functions.php on line 669 HTML Code:
adsense_ad = '<div class="bfa-adsense"> HTML Code:
$adsense_ad = '<div class="bfa-adsense"> |
I'm closing this thread because it started in version 3.2 and things have changed. The info is a mix of old and new which is confusing even myself! I've opened a new thread to deal with version 3.4.4 and above. see http://forum.bytesforall.com/showthr...4066#post34066
|
All times are GMT -6. The time now is 10:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.