After upgrading to Wordpress 3.0, I can't put anything inside functions.php without errors

I upgraded to version 3.0 and all was great. Then, I installed the plugin 'Post Links To'. I noticed then I couldn't log out without getting a white page, I also couldn't update things. Some of the dashboard still worked but it was a real problem.

I then deleted the plugin but the problem remained.

The weirdest thing is, if I change theme, or remove everything from my functions.php in the theme I want, it works again.

I made the theme on 2.9 and it also worked in 3.0 before that plugin.

Any help is hugely appreciated.

Henry.

EDIT: here is the paste bin: http://pastebin.com/GMpPEm4T

Solutions

remove any whitespace in the file.

Stop closing and opening the PHP brackets. The newlines are being echoed to the browser, sending the headers way before WordPress is ready. Here's a pastebin that should work:

http://pastebin.com/wdyMELvP

General rule of thumb: never close PHP in the middle of the file unless you're inside a function declaration or a conditional.

Tags: Wordpress / Plugins

Similar questions

Errors using Wordpress functions from child theme functions.php
So i have a child theme in my Wordpress, works great. I have a functions.php in my child theme for some simple shortcodes. However, I am making a new shortcode, and I need to grab the featured image of a post based on post_id. So I have: However, I get an error about an undefined function: So how can I use basic wordpress functions from inside my c...
Wordpress wpdb->insert returns int(0) => doesn't insert anything, no errors!
I am really clueless. I want to do an insertion in my WordPress plugin the problem is it doesn't return any errors nor it insert the stuff! I don't know how to fix this and really need your help. In the following code i used example names, but i used the character - for these in case of that my real table has also names with - in it as well as the ...
Stuck with complex wordpress .htaccess file. If I use anything else the site goes 404 errors and wont save new posts or pages
I had a 404 error issue recently on a self-hosted wordpress site. I removed the .htaccess file but after that I could only get it to work using default page number permalinks which was not how it was setup originally, as a result many pages still had issues (it was setup using %postname%) . If I then changed the permalinks to anything other than de...
When is it appropriate to put functions on page template vs. functions.php?
I'd like to improve my code and on a current theme, I've extended Wordpress with custom post types, metadata, customized user authentication, and a number of other items. Some of these functions exist in the functions.php file while I've put others directly on the template files that they relate to. I have little reason for doing this initially, ot...
Get all texts inside h4, p etc tags and put it inside php gettext
Hello all :) My client wants his wordpress site to be multilingual. The problem is that the php files with the content (in this case the tickets.php) have hardcoded html text. I must translate about 200 tags -- only in tickets.php, imagine in all the others files :'( --. I'll use poedit but first I need to wrap those tags with php gettext. Lets say...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.