Wordpress: custom field display twice
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 publi开发者_高级运维sh to see the update.
And after I saved my post, the custom field display twice.
name : Steffi
name : Steffi
Help, please ! Thanks
I think you only need to change the php variable in this sample code:
<?php
$cf_video = 'video_code';
$video_meta = get_post_meta($post->ID, $cf_video, true);
echo ($video_meta);
?>
there are more about this in http://monstertut.com/2012/06/wordpress-custom-field-template/
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
I know this is an old question, but hopefully this will help someone else with this issue.
I personally found that removing the closing php tag (?>
) from the end of my functions.php file resolved this issue.
精彩评论