Skip to content

Instantly share code, notes, and snippets.

@DrewAPicture
Created April 10, 2014 19:46
Show Gist options
  • Save DrewAPicture/10416268 to your computer and use it in GitHub Desktop.
Save DrewAPicture/10416268 to your computer and use it in GitHub Desktop.
Attempting to concatenate something in-line onto the end of the post content, wpautop insists on adding a line break between them. This gets around that.
<?php
remove_filter( 'the_content', 'wpautop' );
$content = wpautop( $content, false );
echo apply_filters( 'the_content', $content );
add_filter( 'the_content', 'wpautop' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment