Title: Adding a custom field correctly
Last modified: August 21, 2016

---

# Adding a custom field correctly

 *  Resolved [dbd2](https://wordpress.org/support/users/dbd2/)
 * (@dbd2)
 * [12 years ago](https://wordpress.org/support/topic/adding-a-custom-field-correctly/)
 * Hi,
 * I am trying to add a field, “Country of Origin”, that would work similar to Categories:
   -
   Countries can be added, similar to the Add New Feature of Categories -When creating
   an event, you can select a drop-down of previously entered Countries -When viewing
   an event page, the Country of Origin would display
 * I used this tutorial: [http://wp-events-plugin.com/tutorials/creating-a-events-manager-add-on-a-complete-walkthrough/](http://wp-events-plugin.com/tutorials/creating-a-events-manager-add-on-a-complete-walkthrough/)
 * I was able to add a section that would allow me to add a Country of Origin field.
   However, when I added the code here: [http://wp-events-plugin.com/tutorials/creating-custom-permalinks-in-wordpress/](http://wp-events-plugin.com/tutorials/creating-custom-permalinks-in-wordpress/)
   
   I received syntax errors from this line: `$events_slug = $events_page->post_name;`
   Without the code from this page, it seemed to work, but it doesn’t function like
   Categories (drop-down box when creating an event, or displaying on an event page)
 * Am I doing this correctly, or is there a better way?
 * Thanks!
 * [https://wordpress.org/plugins/events-manager/](https://wordpress.org/plugins/events-manager/)

Viewing 1 replies (of 1 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [12 years ago](https://wordpress.org/support/topic/adding-a-custom-field-correctly/#post-4882911)
 * maybe you can try to use or create custom taxonomy instead then see this link–
   [http://wp-events-plugin.com/tutorials/using-additional-custom-taxonomies/](http://wp-events-plugin.com/tutorials/using-additional-custom-taxonomies/)

Viewing 1 replies (of 1 total)

The topic ‘Adding a custom field 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/adding-a-custom-field-correctly/#post-4882911)
 * Status: resolved