If you want to have greater control over your blog, you can stop WordPress from inserting paragraph tags in your content. WordPress utilizes the TinyMCE editor, which automatically adds paragraph tags around line breaks. This feature helps your site conform to standard coding practices, but it can interfere with the layout and design of your site. To remedy this, you can edit the "wpautop" filter in your theme to disable paragraph tags so they stop appearing by default.
Log in to your WordPress account, click "Appearance" and then click the "Editor" link. This action launches the "Theme Editor" page, which contains the files that enable you to modify your blog's code.
Click the "functions.php" file under the Templates heading to open it and display the code. Type the following code at the end:
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
Click the "Update File" button to save your changes.
Courtesy: betterhelp |
Click the "functions.php" file under the Templates heading to open it and display the code. Type the following code at the end:
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
Click the "Update File" button to save your changes.