Wednesday 18 November 2015

WordPress Quit Inserting Tags

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.

Courtesy: betterhelp
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.

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews