I want to create a conditional tag which displays the comments or not.
If custom field 'thumb' = not empty then they must be shown, otherwise not.
Couldn't find anything on http://codex.wordpress.org/Conditional_Tags or anywhere in the codex
I want to create a conditional tag which displays the comments or not.
If custom field 'thumb' = not empty then they must be shown, otherwise not.
Couldn't find anything on http://codex.wordpress.org/Conditional_Tags or anywhere in the codex
PS all values are different so I can't select on where thumb=some_value
$key = "thumb";
$thumb = get_post_meta($post->ID, $key, true);
if (!$thumb){
echo "";
}else{
echo "Place your comments here";
}
Good luck
You must log in to post.