Any way to hide meta field not filled?
Viewing 3 Posts - 1 through 3 (of 3 total)
Author | Posts |
---|---|
April 30, 2013 at 2:42 pm 3024 | |
Hello Tareq, I've inserted into post template some codes to show meta field like these: <?php echo get_post_meta( $post->ID, 'name1', true ); ?> <?php echo get_post_meta( $post->ID, 'name2', true ); ?> There's some way to hide in post page this field if they aren't filled by user? Thank you. | |
April 30, 2013 at 2:44 pm 3025 | |
You can use it like that – <?php if( $name1 = get_post_meta( $post->ID, 'name1', true ) ) { echo $name1; } ?> | |
April 30, 2013 at 4:07 pm 3031 | |
Wow! Thank you Tareq for your kindness. And congratulations again for this amazing plugin. | |
April 30, 2013 at 4:16 pm 3032 | |
Would you be able to give us a testimonial? |
Viewing 3 Posts - 1 through 3 (of 3 total)