我在管理仪表板的帖子列表页面中显示了许多自定义字段。我的帖子标题有点长,再加上这么多额外的字段,让人觉得桌子很拥挤。
有没有可能将其拆分为一个包含文章标题的全宽行,下面是包含所有其他字段的另一行。
请原谅我做了一个粗糙的模型,但希望这能让你了解我在追求什么。
我在管理仪表板的帖子列表页面中显示了许多自定义字段。我的帖子标题有点长,再加上这么多额外的字段,让人觉得桌子很拥挤。
有没有可能将其拆分为一个包含文章标题的全宽行,下面是包含所有其他字段的另一行。
请原谅我做了一个粗糙的模型,但希望这能让你了解我在追求什么。
您可能需要稍微玩弄一下CSS。但对我来说,使用CSS就可以了。
大体上
增加height
每行的td, th
) 向下一点(使用padding-top
)padding-top 对于标题列和position
信息技术absolute
适当的lyleft
和right
值
add_action(\'admin_head\', \'my_custom_style\');
function my_custom_style() {
echo \'<style>
.type-post {
height: 100px;
}
.type-post td,
.type-post th,
.type-post .fixed .column-comments {
padding-top: 50px;
}
.type-post .column-title.page-title {
padding-top: 0px;
left: 35px;
right: 20px;
position: absolute;
/*border: 1px solid red;*/
}
</style>\';
}
或者,您可以将CSS放在外部文件中,并将其包括在内,如:function admin_style() {
wp_enqueue_style(\'admin-styles\', get_template_directory_uri().\'/admin.css\');
}
add_action(\'admin_enqueue_scripts\', \'admin_style\');
请注意,其\'admin_enqueue\\u scripts”而非标准的“wp\\u enqueue\\u scripts”我有一个很奇怪的,以前从未见过的问题。。。每当我访问仪表板时,大约3-5秒后,我的主题就会加载到仪表板布局中。这就像主题的样式表以某种方式排队。。。这是我的排队钩functions.php:function myyogawebsite_scripts() { wp_enqueue_style( \'foundation-normalize\', get_template_directory_uri() . \'/css/normalize.css\' ); wp_