Title: onway's Replies | WordPress.org

---

# onway

  [  ](https://wordpress.org/support/users/onway/)

 *   [Profile](https://wordpress.org/support/users/onway/)
 *   [Topics Started](https://wordpress.org/support/users/onway/topics/)
 *   [Replies Created](https://wordpress.org/support/users/onway/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/onway/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/onway/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/onway/engagements/)
 *   [Favorites](https://wordpress.org/support/users/onway/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Events Manager - Calendar, Bookings, Tickets, and more!] Add custom taxonomy to Buddypress edit page](https://wordpress.org/support/topic/add-custom-taxonomy-to-buddypress-edit-page/)
 *  Thread Starter [onway](https://wordpress.org/support/users/onway/)
 * (@onway)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/add-custom-taxonomy-to-buddypress-edit-page/#post-5873846)
 * I made it, but not sure if it is the best way. I placed the category dropdown
   in events-manager/forms/location-editor.php just like in categories-public.php
   
   Then I made AJAX post to save categories when selected.
 *     ```
       <script type="text/javascript">
       	jQuery(document).ready(function(){
       		jQuery('#loc-categoryselect').blur(function(){
       			var cats =  jQuery(this).val();
       			jQuery.ajax({
       				type: "POST",
       				url: "<?php echo get_template_directory_uri()?>/plugins/events-manager/forms/location/ajax-save-cats.php",
       				data: {
       					categories: cats,
       					current_location: <?php echo $EM_Location->post_id;?>
       				},
       				success: function (isError) { //show little green tick
                            	if (!isError){
                            		jQuery('#loc-cat-title').fadeIn('slow').fadeOut(5000);
                            	}
                           }
       			});
       		});
       	});
   
       </script>
       ```
   
 * The ajax-save-cats.php file use wp_set_object_terms to save the categories.
 *     ```
       if (isset($_POST["categories"]) && !empty($_POST["categories"])) {
       		$cat_ids = $_POST["categories"];
       		$cat_ids = array_map( "intval", $cat_ids );
       		$cat_ids = array_unique( $cat_ids );
       		$term_taxonomy_ids = wp_set_object_terms( $current_location_id, $cat_ids, "location_category");
   
       		header( "Content-Type: application/json" );
       		echo json_encode(is_wp_error( $term_taxonomy_ids ));
       	}
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Frontend Edit Profile] Text domain not working](https://wordpress.org/support/topic/text-domain-not-working/)
 *  Thread Starter [onway](https://wordpress.org/support/users/onway/)
 * (@onway)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/text-domain-not-working/#post-5119468)
 * I hope it will be fixed in the next update. 🙂
 *   Forum: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
   
   In reply to: [Interest Level in Web to Print plugin for WP](https://wordpress.org/support/topic/interest-level-in-web-to-print-plugin-for-wp/)
 *  [onway](https://wordpress.org/support/users/onway/)
 * (@onway)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/interest-level-in-web-to-print-plugin-for-wp/#post-4030293)
 * Im interested in too. How can I Contact you

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