Check if is_category or in_category on Cloud Templates

Posted in: Newspaper
Post count: 108

Hi Guys,

I’m using a custom shortcode which I place in the sidebar on cloud archive templates and cloud single post templates.

The shortcode works fine with standard pack templates but fails to render anything in cloud templates.

The shortcode is really simple, like this.

if ( is_category(306) || ( is_single() && in_category(306) && !has_tag(array(464,37755)) ) )
{
echo do_shortcode(‘[bsa_pro_ad_space id=”63″ crop=”no”]’);
}

I assume it’s because the categories and tags aren’t being fetched by the cloud templates so is_category or in_category aren’t working properly.

What do I need to do in order for the shortcode to work in cloud templates?
Do I need to declare the queried object id’s somehow?

Thanks
Matt

Post count: 21065

Hello Matt!

Please note that the customization(code) will require custom work which is not covered by the support team.

Thank you so much for understanding!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.