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
June 14, 2013 at 11:44 pm
#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 .= ‘
$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.png “http://i39.tinypic.com/2yvrzok.png”). It removes my container and all the events and just displays the
> “string(33) “Extra Details “”