WordPress advanced custom layout content editor template

WordPress TinyMCE editor is a very powerful tool for designers to use WordPress editor TinyMCE is not what difficult, but for those who do not understand the HTML people but it is not so easy; if I have to do a WYSIWYG content editor, put content editor the layout is done, and we as long as the user in the corresponding area directly on the line input. The questions mentioned above can be easily solved, and it can also improve the efficiency of our editing.

today to introduce the advanced production techniques of WordPress custom layout template editor, to achieve WYSIWYG, so we have to add custom in the content editor preset in content and layout, combined with our style sheet can easily achieve this function.


creates custom layout

layout layout is divided into two parts, one is the layout of HTML layout, and the other is the CSS style sheet interface.

HTML layout layout

< PHP? Add_filter (‘default_content’,’custom_editor_content’); function custom_editor_content ($content) {$content = < ‘; div class=" content-col-main" > here is the main content area < P style=" color: #999; " > /p> sleep only the front of http://s.jiawin.com< < /div> < div class=" content-col-side" >; here is the sidebar content area < P style=" color:#999; " > /p> sleep only the front of http://s.jiawin.com< < /div>’; return $content; >


WordPress’s default_content filter can only work in newly created articles or pages, and previously published articles or pages will not work. So don’t worry, it will affect the published articles.


Leave a Reply

Your email address will not be published. Required fields are marked *