Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何设置wordpress元框位置_Php_Html_Wordpress - Fatal编程技术网

Php 如何设置wordpress元框位置

Php 如何设置wordpress元框位置,php,html,wordpress,Php,Html,Wordpress,所以我有一个自定义的metabox,我需要它在文章标题之后,有没有办法设置职位顺序 //乐 不起作用: //create a variable and store the widget $widget1 = $wp_meta_boxes['dashboard']['normal']['core']['information']; // unset both widgets unset($wp_meta_boxes['dashboard']['normal']['core']['informat

所以我有一个自定义的metabox,我需要它在文章标题之后,有没有办法设置职位顺序

//乐 不起作用:

//create a variable and store the widget
$widget1 = $wp_meta_boxes['dashboard']['normal']['core']['information'];

// unset both widgets
unset($wp_meta_boxes['dashboard']['normal']['core']['information']);

//re insert widget in the order you want
$wp_meta_boxes['dashboard']['normal']['core']['information'] = $widget1;
这是一个关于强制将仪表板小部件置于顶部的示例。该理论可用于布置post/page元框

//create a variable and store the widget
$widget1 = $wp_meta_boxes['dashboard']['normal']['core']['your widget id'];
$widget2 = $wp_meta_boxes['dashboard']['normal']['core']['other widget id'];

// unset both widgets
unset($wp_meta_boxes['dashboard']['normal']['core']['your widget id']);
unset($wp_meta_boxes['dashboard']['normal']['core']['other widget id']);

//re insert widget in the order you want
$wp_meta_boxes['dashboard']['normal']['core']['other widget id'] = $widget2;
$wp_meta_boxes['dashboard']['normal']['core']['your widget id'] = $widget1;
还可以使用jQuery在框显示后移动它们

$('#pageparentdiv').prependTo('#normal-sortables');
$('#panel_38').insertAfter('#pageparentdiv');
这是一个关于强制将仪表板小部件置于顶部的示例。该理论可用于布置post/page元框

//create a variable and store the widget
$widget1 = $wp_meta_boxes['dashboard']['normal']['core']['your widget id'];
$widget2 = $wp_meta_boxes['dashboard']['normal']['core']['other widget id'];

// unset both widgets
unset($wp_meta_boxes['dashboard']['normal']['core']['your widget id']);
unset($wp_meta_boxes['dashboard']['normal']['core']['other widget id']);

//re insert widget in the order you want
$wp_meta_boxes['dashboard']['normal']['core']['other widget id'] = $widget2;
$wp_meta_boxes['dashboard']['normal']['core']['your widget id'] = $widget1;
还可以使用jQuery在框显示后移动它们

$('#pageparentdiv').prependTo('#normal-sortables');
$('#panel_38').insertAfter('#pageparentdiv');

//创建一个变量并存储小部件$widget1=$wp\u meta\u box['dashboard']['normal']['core']['information'];//取消两个小部件的设置取消($wp_meta_box['dashboard']['normal']['core']['information'])//按照您想要的顺序重新插入小部件$wp_meta_box['dashboard']['normal']['core']['information']=$widget1不起作用代码示例用于仪表板小部件。必须对post/页面元框进行修改,但理论仍然是一样的。将元框另存为变量、删除元框、将变量插入元框。因此,在我的自定义帖子类型中,我需要它是这样的:帖子标题、自定义元框、编辑器等等…
//创建一个变量并存储小部件$widget1=$wp_元框['dashboard']['normal'['core']['information'];//取消两个小部件的设置取消($wp_meta_box['dashboard']['normal']['core']['information'])//按照您想要的顺序重新插入小部件$wp_meta_box['dashboard']['normal']['core']['information']=$widget1不起作用代码示例用于仪表板小部件。必须对post/页面元框进行修改,但理论仍然是一样的。将元框另存为变量、删除元框、将变量插入元框。因此,在我的自定义帖子类型中,我需要它是这样的:帖子标题、自定义元框、编辑器等等。。。