-
Notifications
You must be signed in to change notification settings - Fork 20
Description
From a wonderful contributor:
I'm using IssueM 2.7.4 and experiencing a problem when certain issues are saved; the system isn't properly registering when a post is or isn't a featured thumbnail or a featured rotator item when displaying using the shortcode.
The problem is in how the system finds non-featured posts; line 54 of issuem-shortcodes.php checks to see if the meta fields _featured_rotator or _featured_thumb exist in a post. This worked until recently, when a coding change in lines 187 and 192 of issuem-post-type.php sets those meta fields to the word "off" if they're not set.
So, the meta field contains the word "off", but the check is to see if the field exists at all, which will always return true.
My fix was to change line 54 of issuem-shortcodes.php to read:
$args['meta_query'] = array(
'relation' => 'AND',
array(
'key' => '_featured_rotator',
'compare' => '!=',
'value' => 'on'
),
array(
'key' => '_featured_thumb',
'compare' => '!=',
'value' => 'on'
)
);