默认编辑器(视觉编辑器或文本编辑器)中没有表功能,因此除非使用CKEditor 这确实会生成标记,我会使用一个短代码。
function table_wrapper_wpse_114253( $atts, $content = null ) {
  return \'<table class="abc xyz">\'.$content.\'</table>\';
}
add_shortcode(\'table\',\'table_wrapper_wpse_114253\');
 在你的内容中,只需写
[table]...[/table] 而不是
<table>...</table>如果你的主题使用body_class 和post_class 正确,您所要做的就是向每个添加一个类<table> 在帖子正文中,几乎可以肯定存在现有的标记,无论您是否在the_content 正如@EugeneManuilov所建议的,或者是一个短代码。