WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a little bug on my WordPress...

When I added a custom field, I have no ajax, I need to saved the draft or publish to see the update.

And after I saved my post, the custom field display twice.

name :   Steffi

name :   Steffi

Help, please ! Thanks

Update : Console with Firebug

_ajax_nonce 0
_ajax_nonce-add-meta    53208ba18d
action  add-meta
metakeyselect   titre
metavalue   e
post_id 1151
share|improve this question
Can you show us the code you use to display data? – Steven Dec 15 '10 at 18:41
I don't use code. I just add my custom field in my post :) The custom field display twice in the post (admin) – Steffi Dec 15 '10 at 18:48
Custom fields do not "display" just. That needs some code, and that's the part Steven was asking for. By default, custom fields are not displayed at all. – hakre Feb 6 '11 at 14:51
up vote 1 down vote accepted

Hey guys, I found THE solution.

Problems :

  • Custom field display twice.

  • No Ajax/jQuery visual feedback.

If you've been working on the file function.php, make sure you remove extra line breaks.

Particularly at the top and the bottom of your file... If you have some line breaks, your xml got an error : XML or text declaration not at start of entity

share|improve this answer
You can prevent many problems by not putting the ending ?> in your functions.php. Could you accept this answer (by clicking the checkbox) so the system knows you solved it? Thanks, and welcome to the WordPress Stack Exchange! – Jan Fabry Dec 28 '10 at 18:23
Please accept your own answer as "answer" so that this question is marked as solved. – hakre Feb 6 '11 at 14:52

Try this:

Add this to your config.php file:

define( 'CONCATENATE_SCRIPTS', false );

above the line /* That's all, stop editing! Happy blogging. */

Found here.

share|improve this answer
config.php or wp_config.php ? – Steffi Dec 15 '10 at 19:06
config.php doesnt exists, it's wp-config.php – kevin Dec 15 '10 at 19:09
it doesn't work... I don't know why. When I added the custom field: No ajax. And when I refresh, it always displays twice... – Steffi Dec 15 '10 at 19:13
Any error message in the administration? Is it local or online? First time it's doing that? – kevin Dec 15 '10 at 19:18
No error message in the administration. It's online. I think it's doing that since I installed WP-PostViews... (but I can't deleted it, I need it. lol) – Steffi Dec 15 '10 at 19:21

"Particularly at the top and the bottom of your file... If you have some line breaks, your xml got an error : XML or text declaration not at start of entity"

In addition, you should remove intermediate occurrences of php's closing tag ?>.

For example:




 ...Some HTML Code...    


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.