2011-10-16 95 views
2

我正在创建一个博客,将要在他们的网站上发布5个不同的自定义帖子,我已经创建的帖子。显示自定义CSS和HTML指示的帖子WordPress的

由于某些类别需要用户点击发布数据(因此创建ul> li),因此请确保它在网站上显示时的样式正确。

为了确保该网站的编辑人员能够正确地将数据输入到管理员后台区域,

  1. 在新/编辑帖子屏幕的右侧显示图片,其中包含有关如何创建自定义帖子的说明。

或/和

  1. 有水印的输入形式(如它SATS“插入标题此处”)得到的数据应该如何显示一个例子。

我使用插件更多字段来显示我的输入字段。这可以选择插入HTML,并且我已经将图像和代码放在这些图像和代码中取得了不同的成功,因为它似乎是零星的,如果它工作或没有!

任何帮助是极大的赞赏。

回答

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> 
&lt;b&gt;This text is bold&lt;/b&gt; 
&lt;strong&gt;This text is strong&lt;/strong&gt; 
&lt;i&gt;This text is italic&lt;/i&gt; 
&lt;em&gt;This text is emphasized&lt;/em&gt; 
&lt;code&gt;This is computer output&lt;/code&gt;</pre> 
    <?php 
} 

导致:
custom meta box with instructions


其他可能性可以插入自定义Help Tab

相关问题