通过myphpadmin修改Metabox自定义字段,导致WordPress显示空白
所以基本上在我的 WordPress 网站上,我链接图像并且最近更改了图像域名,所以我进入 phpmyadmin 并输入:
UPDATE `wp_postmeta` SET `meta_value` = Replace(meta_value, 'old-domain.com' , 'new-domain.com')
和我的 mysql/phpmyadmin,它全部更新到新域,但在 WordPress 上,自定义字段尚未获取新详细信息,并且是留空。
这是我的自定义字段数组:
'title' => 'Embed Image',
'pages' => array( 'post' ),
'tabs' => array(
'input-version' => array(
'label' => 'Input Version',
'icon' => 'dashicons-admin-customizer',
),
'tab_style' => 'default',
'fields' => array(
array(
'id' => 'ab_embedgroup',
'type' => 'group',
'clone' => true,
'sort_clone' => true,
'save_state' => true,
'desc' => '<b style="color:red;">Insert embed code</b>',
'tab' => 'input-version',
'fields' => array(
array(
'name' => 'Host Name',
'id' => 'ab_hostname',
'type' => 'text',
),
array(
'name' => 'IMEmbed',
'id' => 'ab_embed',
'type' => 'textarea',
'sanitize_callback' => 'none',```
cleared cache, restarted VPS, tried it all, just cant understand why it wont pick it up.
am i editing it incorrectly? Cant do it one by one because its a few thousand images.
so basically on my wordpress site, i link images and i recently changed my image domain name, so i went into phpmyadmin and typed:
UPDATE `wp_postmeta` SET `meta_value` = replace(meta_value, 'old-domain.com', 'new-domain.com')
and my mysql/phpmyadmin, its all updated to the new domain, but on wordpress, the custom field hasnt picked up the new details and is left blank.
this is my array for the custom field:
'title' => 'Embed Image',
'pages' => array( 'post' ),
'tabs' => array(
'input-version' => array(
'label' => 'Input Version',
'icon' => 'dashicons-admin-customizer',
),
'tab_style' => 'default',
'fields' => array(
array(
'id' => 'ab_embedgroup',
'type' => 'group',
'clone' => true,
'sort_clone' => true,
'save_state' => true,
'desc' => '<b style="color:red;">Insert embed code</b>',
'tab' => 'input-version',
'fields' => array(
array(
'name' => 'Host Name',
'id' => 'ab_hostname',
'type' => 'text',
),
array(
'name' => 'IMEmbed',
'id' => 'ab_embed',
'type' => 'textarea',
'sanitize_callback' => 'none',```
cleared cache, restarted VPS, tried it all, just cant understand why it wont pick it up.
am i editing it incorrectly? Cant do it one by one because its a few thousand images.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论