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

#138778
__
Participant

I assume this is lines 134-137…?

On the surface, I don’t see any reason why this wouldn’t work as desired. No offense to you (or anyone), but I have a strong dislike for WP behind-the-scenes, and the “shortcode” and “functions.php” models are two of the main reasons why. : )

`get_post_meta` (with `$single=true`) is supposed to return an empty string if it finds nothing.

/* snip */
// on|around line 134:
$event_info = get_post_meta($post->ID, ‘event_info’, true);

// add this right here
var_dump( $event_info ); exit;

// tell me what it shows you