• Resolved derekchamberlin

    (@derekchamberlin)


    Please help!

    I’ve been looking at this quite a bit and I can’t seem to get this working. I’ve been trying to use the shortcode and the PHP loop code to try to filter out different categories for either a page template or a post / page. I’ve tried using the following pieces of code (keep in mind they were for different pages so I was trying to filter different categories)

    This is what I used for the page to try to only show category 4. This either showed everything or nothing:

    [events_list category=-1,-2,-3 limit=20 orderby=event_start_date pagination=1][/events_list]

    I also tried the two following pieces of code that I found on the Events Manager website and a support forum. These both either showed everything or nothing as well:

    <?php query_posts( array ( ) );

    if (class_exists(‘EM_Events’)) {
    echo EM_Events::output( array(‘limit’=>3, ‘orderby’=>’event_start_date’, ‘category’=>-4) );
    } ?>

    <?php echo do_shortcode(‘[events_list full=”1″ category=”-4″ limit=3 orderby=”event_start_date”]’); ?>

    On top of trying the exclude category feature, as shown above, I also tried to the opposite by listing all the categories except the ones I wanted to exclude. I haven’t had any sort of luck with this. At this point I’m assuming maybe this feature just doesn’t work. I’m fairly code savvy, but this is proving to be a real pain. I’d really appreciate some help on this!

    Thanks a bunch in advance!

    http://wordpress.org/extend/plugins/events-manager/

Viewing 3 replies - 1 through 3 (of 3 total)
  • have you tried something like this [events_list category=”-1,-2,-3″ limit=”20″ orderby=”event_start_date” pagination=”1″][/events_list] ?

    Thread Starter derekchamberlin

    (@derekchamberlin)

    Hey agelonwl,

    I’d tried the similar code shown above, but after seeing your response, I tried the way that you posted as well. This didn’t give me any different results. I really appreciate the help! I’m open to try any different suggestions.

    Thanks again for your help,

    Derek

    hmm. seems to be working fine on my test site; e.g. [events_list category="-10,-14,-22" limit="20" orderby="event_start_date" pagination="1"][/events_list] this shortcode only shows events with category id 17; Is 1,2,3,4 is your category id? you can see category id by clicking screen options on the top right corner of the page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Events Manager] Can't filter out categories v5.1.7’ is closed to new replies.