Show code dependant on CPT & category

Question

I’m currently using the following plugin on my WordPress website to show our up coming events:
https://wordpress.org/plugins/import-eventbrite-events/

I need to write an IF statement that will check the custom post type and then a category of the post type which will then return my custom code.

So far I’ve tried the following code:

if ( is_singular( ‘eventbrite_events’ ) && has_category( ‘network’ ) )

If I remove the category reference it works, but it will show my custom code on all events pages. Whereas I only want it to show the code in a certain category of the custom post type.

0
Jordan Kellett 2 months 0 Answers 5 views 0

Leave an answer