Title: Using post categories
Last modified: August 21, 2016

---

# Using post categories

 *  Resolved [ewebber](https://wordpress.org/support/users/ewebber/)
 * (@ewebber)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/)
 * Is it possible to use the standard post categories for the events pages?
    What
   I’d like is for events to show up with other posts in the category pages. Thanks
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

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

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604560)
 * yes, here’s another thread which may help you with this – [http://wordpress.org/support/topic/events-manager-using-post-categories?replies=8](http://wordpress.org/support/topic/events-manager-using-post-categories?replies=8)
 *  Thread Starter [ewebber](https://wordpress.org/support/users/ewebber/)
 * (@ewebber)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604725)
 * Thanks, I have added the categories into the events post type and I am showing
   them alongside the main posts which is great. Now I’m looking at editing the 
   form so that people can pick those categories from the front end.
 * I am in the /wp-content/themes/yourtheme/plugins/events-manager/forms/event/categories-
   public.php file, what should I change to pull the default categories instead 
   of the EM ones?
 *  [Philip John](https://wordpress.org/support/users/philipjohn/)
 * (@philipjohn)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604738)
 * Hiya,
 * Take a look at the codex which will give you the info you need to extract the
   categories: [http://codex.wordpress.org/Function_Reference/get_categories](http://codex.wordpress.org/Function_Reference/get_categories)
 * Thanks
 *  Thread Starter [ewebber](https://wordpress.org/support/users/ewebber/)
 * (@ewebber)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604742)
 * [@angelo_nwl](https://wordpress.org/support/users/angelo_nwl/) can you let me
   know if I’m in the right file, or should I be looking at a different one.
    Thanks
 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604744)
 * yes, you are in the right file and you might need to call post categories quite
   the same on how we call event categories.
 *  Thread Starter [ewebber](https://wordpress.org/support/users/ewebber/)
 * (@ewebber)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604745)
 * @anglo_nwl thanks, I now have it showing the categories on the event submit form,
   but it’s not passing them through the the created event
 * so far I have
 *     ```
       <?php
       /*
        * This file is called by templates/forms/location-editor.php to display fields for uploading images on your event form on your website. This does not affect the admin featured image section.
       * You can override this file by copying it to /wp-content/themes/yourtheme/plugins/events-manager/forms/event/ and editing it there.
       */
       global $EM_Event;
       /* @var $EM_Event EM_Event */
       $categories = get_categories(array('orderby'=>'name','hide_empty'=>0));
       ?>
       <?php if( count($categories) > 0 ): ?>
       <div class="event-categories">
       	<!-- START Categories -->
       	<label for="event_categories[]"><?php _e ( 'Category:', 'dbem' ); ?></label>
       	<select name="event_categories[]" multiple size="10">
       	<?php
       	$selected = $EM_Event->get_categories()->get_ids();
       	$walker = new EM_Walker_CategoryMultiselect();
       	$args_em = array( 'hide_empty' => 0, 'name' => 'event_categories[]', 'hierarchical' => true, 'id' => EM_TAXONOMY_CATEGORY, 'taxonomy' => EM_TAXONOMY_CATEGORY, 'selected' => $selected, 'walker'=> $walker);
       	echo walk_category_dropdown_tree($categories, 0, $args_em);
       	?></select>
       	<!-- END Categories -->
       </div>
       <?php endif; ?>
       ```
   
 * Is it possible to make this change in this file and can you help me understand
   what I should change, I’d really appreciate some pointers – thanks
 *  [Philip John](https://wordpress.org/support/users/philipjohn/)
 * (@philipjohn)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604752)
 * You also need to hook into the saving process. Your fields will be passed through
   when the form is submitted, but you need to actually process them.
 * You might be able to use the save_post filter for this.
 * Thanks
 *  Thread Starter [ewebber](https://wordpress.org/support/users/ewebber/)
 * (@ewebber)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604793)
 * I’ve tried to play around with the file, but I’m not getting anywhere, am I looking
   in the right place to be able to hook into the saving process, or should I be
   doing that elsewhere?
    Thanks

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

The topic ‘Using post categories’ 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/)

 * 8 replies
 * 3 participants
 * Last reply from: [ewebber](https://wordpress.org/support/users/ewebber/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/using-post-categories/#post-4604793)
 * Status: resolved