admin管理员组文章数量:1122846
So i migrated from localhost to my server, everything is working but my plugin cannot get the custom fields data anymore.
I get my custom fields this way:
$customs = get_post_custom($nodeid);
$customs['concertname'][0];
Then i tried get post meta and this also returns an empty string... The plugin i use is advanced custom fields, i use my own plugin to get the custom post data and put it in an xml. Local, everything is working like a charm. Plz help, this is for my finals :)
So i migrated from localhost to my server, everything is working but my plugin cannot get the custom fields data anymore.
I get my custom fields this way:
$customs = get_post_custom($nodeid);
$customs['concertname'][0];
Then i tried get post meta and this also returns an empty string... The plugin i use is advanced custom fields, i use my own plugin to get the custom post data and put it in an xml. Local, everything is working like a charm. Plz help, this is for my finals :)
Share Improve this question asked Jun 16, 2012 at 13:54 Toon Van DoorenToon Van Dooren 1012 bronze badges 1 |1 Answer
Reset to default 0When you moved the site, did you export and then re-import the content? I'm wondering if maybe the custom data just didn't make it into the live server's database.
The first place to look for whether that's the case would be either on the post's edit screen or within the database itself with PHPMyAdmin or something similar.
Also, I tend to use get_post_meta() and send the key along as an argument instead of getting all of the values and using the key to pull it from the array like get_post_custom() requires, you might try that and see if that helps.
本文标签: migrationMigrated from localhost to server and cannot get customfields content anymore
版权声明:本文标题:migration - Migrated from localhost to server and cannot get custom_fields content anymore 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736303675a1931967.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
get_post_custom
? That's not a WordPress function – Tom J Nowell ♦ Commented Dec 2, 2022 at 13:27