我正在为一些人创建一个博客,他们将在我创建的5个不同的自定义帖子中将帖子放在他们的网站上。
由于某些类别要求用户指出发布数据(因此创建ul> li),因此请确保它在网站上显示时正确设置样式。
要确保网站的编辑者正确地将数据输入到管理后区域,我希望这样做。
或/和
我正在使用插件更多字段来显示我的输入字段。这可以选择插入HTML,我在将这些图像和代码放置在这些中的过程中取得了不同的成功,因为它看起来是零星的,如果有效的话!
非常感谢任何帮助。
的Si
答案 0 :(得分:0)
如果我理解正确,custom meta box可以解决这个问题。
add_action( 'add_meta_boxes', 'wpse_54822_add_custom_box' );
function wpse_54822_add_custom_box()
{
$post_types = array( 'post', 'movies', 'testimonial' );
foreach( $post_types as $box )
{
add_meta_box(
'wpse_54822_sectionid',
__( 'Instructions' ),
'wpse_54822_inner_custom_box',
$box,
'side'
);
}
}
function wpse_54822_inner_custom_box()
{
?><pre>
<b>This text is bold</b>
<strong>This text is strong</strong>
<i>This text is italic</i>
<em>This text is emphasized</em>
<code>This is computer output</code></pre>
<?php
}
导致:
其他可能性是插入自定义Help Tab。