【发布时间】:2017-06-10 15:55:06
【问题描述】:
我创建了带有表单的自定义帖子类型,供用户编辑内容。在“编辑内容”表单中,我想隐藏正在显示的
标签。我已插入以下内容 - 但它似乎不适用于自定义帖子类型表单:
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
function wpse_wpautop_nobr( $content ) {
return wpautop( $content, false );
}
add_filter( 'the_content', 'wpse_wpautop_nobr' );
add_filter( 'the_excerpt', 'wpse_wpautop_nobr' );
这是包含自定义帖子类型的表格,其中
标签出现在内容中:
<table class="tg">
<tr>
<th class="tg-031e"><strong>[cred_field field='supplier-1' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-031e"><strong>[cred_field field='supplier-2' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-031e"><strong>[cred_field field='supplier-3' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-031e"><strong>[cred_field field='supplier-4' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-031e"><strong>[cred_field field='supplier-5' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-031e"><strong>[cred_field field='supplier-6' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-yw4l"><strong>[cred_field field='supplier-7' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-yw4l"><strong>[cred_field field='supplier-8' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-yw4l"><strong>[cred_field field='supplier-9' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
<th class="tg-yw4l"><strong>[cred_field field='supplier-10' post='charity' value='' urlparam='' ‘placeholder’='Supplier Name']</strong></th>
</tr>
<tr>
<td class="tg-6wtj">[cred_field field='items-column-1' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-6wtj">[cred_field field='items-column-2' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-6wtj">[cred_field field='items-column-3' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-6wtj">[cred_field field='items-column-4' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-6wtj">[cred_field field='items-column-5' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-6wtj">[cred_field field='items-column-6' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-7uzy">[cred_field field='items-column-7' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-7uzy">[cred_field field='items-column-8' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-7uzy">[cred_field field='items-column-9' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
<td class="tg-7uzy">[cred_field field='items-column-10' post='charity' value='' urlparam='' ‘placeholder’='Items Needed']</td>
</tr>
</table>
【问题讨论】:
-
br 标签在哪里?
-
@orabis 我添加了一个屏幕截图,显示这些标签出现的位置 - 因为您需要登录才能看到它
标签: php css wordpress custom-post-type