add p tag back in wordpress

To add the <p> tag back in WordPress, follow these steps:

  1. Log in to your WordPress dashboard.
  2. Navigate to "Appearance" and select "Theme Editor."
  3. Locate the "functions.php" file on the right-hand side.
  4. Click on "functions.php" to open it for editing.
  5. Insert the following code at the bottom of the "functions.php" file:
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
  1. Click the "Update File" button to save the changes.

Adding these lines of code to the functions.php file removes the automatic addition of <p> tags by the wpautop function in WordPress. This function is responsible for adding <p> tags to post content and excerpts. By removing these filters, you prevent WordPress from automatically inserting <p> tags around content.