简体   繁体   中英

Wordpress is not writing <p> and <br> tags

I recently made a new theme but wordpress is stripping out the <p> and <br> tags, so the text is not shown well formatted. I am not writing together another html that can create this issue...

I've seen another questions but got no answer for me. Some of them mentioned about these functions:

remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

But no, i don't have any of these written in my functions.php

So why is this happening?

You will need to put those two filter functions into your own functions.php file in your theme. Without those two lines, the default setting for Wordpress is to filter the <p> and <br> tags.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM