How To Hide Button if No Data Found
-
hero_style is a custom field with web address added by user, when that web address is available it displays the button.
I need it to not show the button if there is no inputed web address?function custom_field() {
global $post;
$url = get_post_meta( $post->ID, ‘hero_style’, true );
echo ‘My Button‘;
}
add_filter( ‘field’, ‘custom_field’ );The blog I need help with is: (visible only to logged in users)
- The topic ‘How To Hide Button if No Data Found’ is closed to new replies.