Created
June 1, 2017 05:52
-
-
Save rajendra89/ccf239d2d6466424af2f5aa1be17bb71 to your computer and use it in GitHub Desktop.
WordPress Custom Fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$meta_value=get_post_meta($post->ID,'views',true); | |
//get_post_meta( int $post_id, string $key = '', bool $single = false )) | |
if(!empty($meta_value)){ | |
echo $meta_value; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment