一般写文章的时候,如果文章过长那么我们就会使用分页功能,wordpress迷" href="http://www.wpmee.com/" target="_blank" rel="noopener noreferrer">WordPress本身具有分页的功能,但是分页的按钮本身并没有加载到mce 标签的文章" target="_blank">tinymce文章编辑器中,不过,既然WordPress把分页按钮隐藏了,我们将它显示出来就ok了。
将下面的代码添加到你的主题中的functions.php中就OK了:
add_filter('mce_buttons','wysiwyg_editor'); function wysiwyg_editor($mce_buttons) { $pos = array_search('wp_more',$mce_buttons,true); if ($pos !== false) { $tmp_buttons = array_slice($mce_buttons, 0, $pos+1); $tmp_buttons[] = 'wp_page'; $mce_buttons = array_merge($tmp_buttons, array_slice($mce_buttons, $pos+1)); } return $mce_buttons; }

博悦天下










