I’m trying to create a query that
IF there is a value in the ‘FeaturedQuote’ custom field, then this shows
<h3 class="featuredquote"><blockquote><span class="bqstart">“</span><?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'FeaturedQuote', true);
wp_reset_query();
?>
<span class="bqend">”</span></blockquote>
</h3>
IF NOT, this shows:
<img src="<?php
global $wp_query;
$postid = $wp_query->post->ID;
echo get_post_meta($postid, 'InsertFullImg', true);
wp_reset_query();
?>">
I cant get it right!
Thanks
Assign the return value of the first check to a variable, and test if there is something in it:
Note, a
<h3>
cannot be the parent of a<blockquote>
. Headlines can contain inline elements only.