Please help. I want users to be able to add posts from the frontend. It works for me, but I do not know how to do it to choose one of the existing tags. I have this code (used from here, but adjustable for my needs):
<?php $taxonomies = array ( 'post_tag' ); $args = array ( 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false ); $terms = get_terms($taxonomies, $args); if(count($terms)> 0): foreach ($terms as $term):?> <div class="wissen_tag_list"> <input type="radio" value="<?php echo $term->term_id; ?>" name="post_tag" class="post_tag_list" <?php if? php}?>> <label class="post_tag_list"> <?php echo $term->name; ?> </label> </div> <?php $i++; endforeach; endif; ?>
My tags will appear, but there is no one to choose. Only the first one is selected. Can you please help me where I am wrong. These are standard tags, no custom.
Thank you very much.