Collapse-o-matic |
Spoilers1 |
Featured acf from 76434
– Collapse-o-matic
Collapse-o-matic |
Spoilers1 |
The plugin has 2 distinct operating modes. 1. Expand shortcode and 2. Roll you own method using mainly html. The various attributes work partly in both modes but not 100%. Eg. “duration” vs. “data-duration”
Remove ‹br› from ACF | Stackexchange.com// Remove br line breaks from ACF function removebreaks($content) { $content = str_replace(‘‹br>’, ”, $content); $content = str_replace(‘‹br/>’, ”, $content); $content = str_replace(‘‹br />’, ”, $content); $content = str_replace(‘‹BR>’, ”, $content); $content = str_replace(‘‹BR/>’, ”, $content); $content = str_replace(‘‹BR />’, ”, $content); $content = str_replace(‘‹lb>’, ‘‹br>’, $content); return $content; }Source: stackexchange.com
Other attempts | NotOK Tried these to no effect > // Remove wpautop from ACF function the_field_without_filters( $the_field=null ) { remove_filter(‘acf_the_content’, ‘wpautop’); if( $the_field ) { the_field( $the_field ); } else { the_field(); } add_filter(‘acf_the_content’, ‘wpautop’); } // Remove wpautop in ACF function acf_wysiwyg_remove_wpautop() { remove_filter(‘acf_the_content’, ‘wpautop’ ); } add_action(‘acf/init’, ‘acf_wysiwyg_remove_wpautop’); // Remove wpautop from ACF function acf_wysiwyg_remove_wpautop() { // remove p tags // remove_filter(‘acf_the_content’, ‘wpautop’ ); // add line breaks before all newlines // add_filter( ‘acf_the_content’, ‘nl2br’ ); } add_action(‘acf/init’, ‘acf_wysiwyg_remove_wpautop’); // remove line breaks before all newlines (ELM from add to remove) // remove_filter( ‘acf_the_content’, ‘nl2br’ );