站长朋友们在使用wordpress建站的过程中会发现,wordpress 本身有个自动分段机制,只要你在可视化模式下敲击一次回车(文本模式敲击两次回车),就会在前台html自动添加分段标签p,其实这个功能是非常方便的,但是在某些情况下干扰了文章内容的格式。
这个自动分段机制,使用的是 wpautop() 函数,只会对文章内容和摘要生效,如果您希望禁用它,可以将下面的代码添加到主题的 functions.PHP 文件即可:
Crayon-5c891cc8f2ff4678108371" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">functions.PHP
Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
Crayon-button-icon">
Crayon-button Crayon-plain-button" title="Toggle Plain Code">
Crayon-button-icon">
Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
Crayon-button-icon">
Crayon-button Crayon-expand-button" title="Expand Code">
Crayon-button-icon">
Crayon-button Crayon-copy-button" title="Copy">
Crayon-button-icon">
Crayon-button Crayon-popup-button" title="Open Code In New Window">
Crayon-button-icon">
Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
Crayon-plain-wrap">
Crayon-main" style="">Crayon-table">
Crayon-nums " data-settings="show"> | Crayon-code">
Crayon-nums " data-settings="show"> | Crayon-code">