Themer Field Connections and wpautop

Hello,

It seems that when I call data using a Themer field connection, wpautop injects a

tag around the content. I want the RAW data as a string so I can wrap it with my own markup!

Examples of field connections I’m using:

[wpbb post:excerpt]

[wpbb post:pods_display field=‘tf_success_desc’]

The data is returned, but it is wrapped with a

tag. Any idea how to stop this behavior? It would be nice if Themer had an option to disable this.

Thanks!

Jake

while i cant speak for the pods shortcode, the wp excerpt function wraps the excerpt in a P tag, so you could write your own shortcode to strip that… like so:

add_shortcode( 'no_p_excerpt', function() {
	$excerpt = do_shortcode( '[wpbb post:excerpt]' );
	$excerpt = preg_replace( '#(^<p>)#', '', $excerpt ); // starting P
	$excerpt = preg_replace( '#(<p>$)#', '', $excerpt ); // closing P
	return $excerpt;
});
1 Like

Thank you for the quick reply and solution! It would be great if Themer had the option to disable the addition of HTML markup - maybe or a field connection parameter that could be added to disable the HTML, and just deliver the data raw. This would be quite helpful for the WooCommerce field connections as well.

Thanks!

Jake