$is_featured_post = get_post_meta(get_the_ID(), 'is_featured', TRUE);
This will return the value in the variable and you can check your condition.
Instead of get_the_ID()
, you can use any post ID
. Refer the documentation here: get_post_meta.
$is_featured_post = get_post_meta(get_the_ID(), 'is_featured', TRUE);
This will return the value in the variable and you can check your condition.
Instead of get_the_ID()
, you can use any post ID
. Refer the documentation here: get_post_meta.