Show code dependant on CPT & category


I’m currently using the following plugin on my WordPress website to show our up coming 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.

Jordan Kellett 2 months 0 Answers 5 views 0

Leave an answer