Contents
How to remove p tag from editor in WordPress?
You can do this by disabling the “wpautop” filter in your theme’s functions file.
- Log in to WordPress and navigate to Appearance from the sidebar menu.
- Click the link to your theme’s “functions.
- Go to the bottom of “functions.
- Remove the “wpautop” function from “the_content()” and “the_excerpt()”:
How do I edit an article on WordPress?
How to edit current content:
- Click on Post > All Posts.
- Find the Post you would like to edit and either click on the title or ‘Edit’ (which appears when the title is hovered over with a mouse)
- Make the changes you desire.
- Either:
How to get rid of p tag in WordPress?
The best and cleanest way to get rid off this tag is to remove the filter that applies it. Go to your functions.php file (Appearance > Editor > functions.php) and add the following code at the end of this file: view source print? if you want to remove P tag from around content output, add this in the file:
How to remove p tag from category description?
if you want to remove P tag from around content output, add this in the file: remove_filter (‘the_content’, ‘wpautop’); to remove P tag from category description, use: remove_filter(‘term_description’,’wpautop’); Another method of removing extra P tag: There is also a way to get raw text without removing the filter.
Across the internet, people have noticed that setting config.enterMode to CKEDITOR.ENTER_BR removes the wrapping paragraph tags from CKEditor. It’s worth noting that the setting changes the behavior of the enter key to insert line breaks rather than paragraphs, which is not desirable.
Is it possible to remove the wrapping paragraph tag?
It would be possible to remove the wrapping paragraph tag with post-processing (either on the server or in CKEditor’s getData event), but that leads us into the same problem as disabling autoParagraph: there’s no top-level block.
https://www.youtube.com/watch?v=uMPPPXVrYCs