Posted On April 6, 2019

How to Disable WordPress Auto Wrap Function ‘wpautp’

kimconnect 0 comments
blog.KimConnect.com >> Codes >> How to Disable WordPress Auto Wrap Function ‘wpautp’

Update: the current version of WordPress has rendered these methods ineffective. I’ll update this post once a working solution is discovered.

WordPress has this function called ‘wpautop’ that would add <p> tags as wrapper to <script> tags. Hence, it may be necessary to play .js by disabling wpauto such as:

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

At more flexible solution is to use a WordPress plugin such as “wpautop control” contributed by the Dev named @bigsmoke on WordPress.org

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Reset Password for All Users inside an OU

$ouName="Funky Dudes" $ouPath = "ou=$ouName,dc=intranet,dc=baam,dc=com" $plaintextPassword='WHATPASSWORD?' $users=Get-ADUser -Filter * -SearchBase $ouPath | Select-object Name,UserPrincipalName,DistinguishedName foreach…

Logon Scripts

Purposes: Mapping network drives Installing and setting a user’s default printer Collecting computer system information…

PowerShell: Set PasswordNeverExpires on SamAccountName

Quick 1-liner Code $accounts=@( 'orange', 'apple', 'pear', 'dog', 'cat', 'dinosaur', 'chicken', 'cow', 'yomama', 'yodada' )…