Title: Category shortcode not working correctly
Last modified: May 15, 2017

---

# Category shortcode not working correctly

 *  Resolved [tamarakorr](https://wordpress.org/support/users/tamarakorr/)
 * (@tamarakorr)
 * [9 years ago](https://wordpress.org/support/topic/category-shortcode-not-working-correctly/)
 * I can’t seem to get the category event search attribute working. Here is an SSCCE
   demonstrating the problem:
 * I added categories to my events by adding an action in my theme to register taxonomies:
 *     ```
       register_taxonomy_for_object_type('category', EM_POST_TYPE_EVENT);
       register_taxonomy_for_object_type('category', EM_POST_TYPE_LOCATION);
       register_taxonomy_for_object_type('category', 'event-recurring');
       ```
   
 * That worked great. Now I can add categories to my events as if they are posts.
 * Next I created a category called Test Category. It has taxonomy ID 62 and slug‘
   test-category’.
 * Then I created an upcoming event called Test Event. I set the time to next week,
   and assigned it to Test Category. I can see that this worked in my Categories
   interface (Test Category now has a count of 1). I can also see it is working 
   in the event itself. Test Category appears ticked when I edit the event.
 * Next I created a new post and put this shortcode in it:
    `[events_list category
   ="test-category"]`
 * But the post gets the output: ‘There are no events planned at the moment.’
 * Perhaps there is something wrong with the slug. I changed it to the category 
   ID:
    `[events_list category="62"]`
 * I’m still getting the same message.
 * I can’t figure out what’s wrong. Could you advise how I can get this shortcode
   working? It’s documented on the website here: [http://wp-events-plugin.com/documentation/shortcodes/](http://wp-events-plugin.com/documentation/shortcodes/)
   and here [http://wp-events-plugin.com/documentation/event-search-attributes/](http://wp-events-plugin.com/documentation/event-search-attributes/).
 * Thanks in advance for your advice!
 * (I posted this on Facebook initially, but the automated response directed me 
   here.)
    -  This topic was modified 9 years ago by [tamarakorr](https://wordpress.org/support/users/tamarakorr/).
    -  This topic was modified 9 years ago by [tamarakorr](https://wordpress.org/support/users/tamarakorr/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [caimin_nwl](https://wordpress.org/support/users/caimin_nwl/)
 * (@caimin_nwl)
 * [9 years ago](https://wordpress.org/support/topic/category-shortcode-not-working-correctly/#post-9133931)
 * I think the issue is that you’ll need to filter the shortcode in some way to 
   have it search through your new taxonomy. By default, it checks only the event-
   categories taxonomy.
 * [http://wp-events-plugin.com/tutorials/using-additional-custom-taxonomies/](http://wp-events-plugin.com/tutorials/using-additional-custom-taxonomies/)
 *  Thread Starter [tamarakorr](https://wordpress.org/support/users/tamarakorr/)
 * (@tamarakorr)
 * [9 years ago](https://wordpress.org/support/topic/category-shortcode-not-working-correctly/#post-9140287)
 * Thanks for pointing me to the documentation – I just quickly made my own shortcode
   to do what I needed.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Category shortcode not working correctly’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [tamarakorr](https://wordpress.org/support/users/tamarakorr/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/category-shortcode-not-working-correctly/#post-9140287)
 * Status: resolved