Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [WORDPRESS] Remove div IF textarea is empty for Events Post Type Function Re: [WORDPRESS] Remove div IF textarea is empty for Events Post Type Function

#138791
asiek
Participant

@traq when I use the line of code you posted

$ret .= ‘

‘;
$event_info = get_post_meta($post->ID, ‘event_info’, true);
var_dump( $event_info ); exit;
if ( ! empty($event_info)) {
$ret .= ‘INFO: ‘ . $event_info . ‘‘ ;
}
$ret .= ‘

‘;

[This happens](http://i39.tinypic.com/2yvrzok.pnghttp://i39.tinypic.com/2yvrzok.png”). It removes my container and all the events and just displays the

> “string(33) “Extra Details “”