How WordPress Processes Post Content

How WordPress Processes Post Content

WordPress processes text entered in the Write Post Panel multiple times before the text is finally displayed on a web page within your WordPress blog. The processing of the text filters out the unwanted code and conforms the text to a form that the browser can interpret. Without attention to detail and familiarity with WordPress’s post content filtering, this can cause unwanted changes.

The majority of the conversion and filters are found in the wp-includes/formatting.php file.

Some typical problems some users have with these filtering and processing functions are:

  1. Empty paragraphs, closing span tags, and line break (BR) elements are removed upon saving.
  2. Classes are removed from elements.
  3. DIV elements are converted to P elements.
  4. Javascripts and code are converted to displayable code rather than actionable code. See Using Javascript for information on how to incorporate Javascript into a blog post.

The following is step-by-step list of how WordPress processes post content text before the final version is displayed.

TinyMCE

TinyMCE is the editor used by WordPress, known as the Rich Text Editor. Not all WordPress bloggers use it, but if you do, it will change various codes upon saving an entry to prepare it for publishing.

wpautop() WordPress Function

wpautop() is a core WordPress function that automatically processes, fixes, and modifies the text of a post.

It puts in line breaks, paragraph tags, opens and closes tags that aren’t opened and closed, and cleans up duplicate HTML tags.

admin

My name is Serge and I’m a creative geek. I truly love web and I enjoy using its great potential.

View my other posts

One Comment on “How WordPress Processes Post Content”

  1. JohnDBlend says:

    WordPress is the best tools ever. WordPress can easily post the content and create a website.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.