Im trying to add new feature to the theme and that's show/hide page title,but since i already have about 50 posts i can't go to all of them and save again just to save custom field values.
So i tried to make check if custom field doesn't exist, or if exist but not set to false show the title. But im failing at some point.
Custom field is metabox with checkbox, when checked it records "1" in database, when unchecked records "0" in database. And of course since im adding it now, 50 posts doesn't have that field in database.
Here is my last tryout.
if ( empty(vf_get_meta($post->ID, 'page_options', 'show_title')) || (vf_get_meta($post->ID, 'page_options', 'show_title') == true ))
This should check if meta is empty or if it's true and show page title. But something im not understanding. Isn't return false if it's empty?
How do i do it than?