Hello,
The function “wp_set_post_tags()” would add tags on an Existing Post. If you’re looking at adding Tags on an Existing Event You could check the “wp_set_post_terms()”. However, If your looking at adding tags using the Front-End submit form. This thread might help you: https://eventsmanagerpro.com/support/questions/tags-in-frontent-event-publishing/
you can also try the following snippets:
1. part 1 -> https://pastebin.com/Nvz4t6ca
2. part 2 -> https://pastebin.com/qj3vTArq
Thanks for the quick answer. I could not access https://eventsmanagerpro.com/support/questions/tags-in-frontent-event-publishing/ because my Pro license has expired. I carried out part 1 and part 2 according to your instructions. Now one tag is taken over at a time and also works with the search function in the full calendar. Unfortunately a multiple selection is not possible. Now I had the idea to create this snippet ( `<div class=”event-categories”>
<label for=”event_tags[]”><?php _e ( ‘Tag:’, ‘events-manager’); ?></label>
<select name=”event_tags[]”>
<?php
$tags = get_categories( array(‘taxonomy’ => EM_TAXONOMY_TAG, ‘hide_empty’ => false ) );
foreach($tags as $tag):
?>
<option value=”<?= $tag->name ?>” > <?= $tag->name ?> </option>
<?php
endforeach;
?>
</select>
</div>` ) and insert two more times underneath. Could there be problems?
-
This reply was modified 4 years, 9 months ago by
netzorder.
for multiple selections, you can change <select name="event_tags[]">
to <select name="event_tags[]" multiple>
Thanks for the help. I changed the code and multiple selection was possible. But only 5 tags were displayed and the rest for scrolling. But in the category selection 20 were displayed. So I looked in the categories-public.php and discovered an addition * size=”20″ *. After changing it to <select name=”event_tags[]” multiple size=”20″> all 20 tags are now displayed. I have no idea about PHP, but with a little help for which I am grateful, and a little trial and error, it worked. Now, checkboxes for categories and tags would be great. Is that possible?
@angelo_nwl thanks for the snippets. So I even managed to use checkboxes instead of select.
@netzorder you might need a developer help on this since we are quite limited with regards to custom coding as per the support policy
http://eventsmanagerpro.com/support-policy/