Looping taxonomy in taxonomy?

In case anyone runs into trouble like I did, I figured it out! $taxonomy_1 = get_terms( ‘taxonomy_1’, $args_1 ); $taxonomy_2 = get_terms( ‘taxonomy_2’, $args_2 ); foreach( $taxonomy_1 as $tax_1 ) { foreach( $taxonomy_2 as $tax_2 ) { $posts = get_posts( array( ‘posts_per_page’ => -1, ‘post_type’ => ‘ENTER-YOUR-CPT’, ‘order’ => ‘ASC’, ‘orderby’ => ‘title’, ‘taxonomy’ => … Read more

Matching usermeta at registration to categories of content

Are you looking for this? function convertInterestCategory() { $interest_categories = array( ‘interest_disaster’, ‘interest_animals’, ‘interest_women’, ‘interest_seniors’, ‘interest_hunger_health’, ‘interest_education’, ‘interest_environment’, ‘interest_arts_culture’, ‘interest_children_youth’, ‘interest_other’, ‘interest_mentoring’, ‘interest_poverty_urban’ ); $current_user = wp_get_current_user(); $user_values = get_user_meta( $current_user->ID ); foreach ( $interest_categories as $interest_category ) { if ( isset( $user_values[$interest_category][0] ) ) echo $user_values[$interest_category][0]; } }

Problem for recover and save metaboxes

Your code: add_action(‘admin_menu’, ‘reaction_buttons_meta_box2’); Use ‘add_meta_boxes’ to add meta boxes. It fires in the wp-admin/edit-form-advanced.php file and passes the $post object. The ‘admin_menu’ action fires much more often. add_action( ‘add_meta_boxes’, ‘reaction_buttons_meta_box2’ ); Your code: function reaction_buttons_meta2() { global $post; echo $_POST[‘reaction_buttons_off2’]; There is nothing in $_POST when the the edit page loads. You can test … Read more