Support

Account

Home Forums General Issues Removing Paragraph Tags from WYSIWYG Fields? Reply To: Removing Paragraph Tags from WYSIWYG Fields?

  • Hi @nitruc

    To solve this, you could create a function to remove, echo, and then add back the filter like so:

    
    <?php 
    
    function the_field_without_wpautop( $field_name ) {
    	
    	remove_filter('acf_the_content', 'wpautop');
    	
    	the_field( $field_name );
    	
    	add_filter('acf_the_content', 'wpautop');
    	
    }
    
     ?>
    

    Now you can use this function and afterwards, there will be no issues!

    Thanks
    E