I have seen people remove br tags from wordpress by adding the following to the functions file:
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
I would like this to affect only one page or page template. Is there any good way to do this? Like use a template name comparison in the functions.php?
EDIT:
For example I have tried the following without result in functions.php for my theme:
if( is_page_template("template_file_name.php") ){
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
}
if you just want to remove all br
can you try targeting that page with css?
This will give the most flexibility