Question

I'm modifying the plugin Wordpress Frontend User for my custom post type(s). What I need to edit is the custom taxonomy terms. In order to do this, I need to list my terms as labels and have checkboxes associated with the labels (in the end associated with the taxonomy when I send a post update).

What I have now is as follows:

$jobsTerms = get_terms('jobtype',array( 'taxonomy' => 'jobtype' )); 
foreach($jobsTerms as $term){
    echo "<label for='term-" . $term->slug . "'>" . $term->name . "</label>";
    echo "<input type='checkbox' name='term" . $term->slug . "' value='" . $term->name . "' />
}

But other than that, I'm lost as to how to check to see if that post has a term selected (if so add checked=checked to the input).

I'm also lost as to how to update this taxonomy when I click submit (which fires a couple custom update_post_meta calls and a wp_update_post call.

Any help?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top