term_id; $term = get_term_by( 'id', $termid, 'question' ); ?>

name ); ?>

description ); ?>

'meta_value', 'meta_key' => 'last_save', 'order' => 'DESC', ); $users = get_users( $args ); //user loop foreach ( $users as $user ) { $userid = $user->ID; //questions loop if( have_rows( 'questions', 'user_' . $userid ) ) { // loop through the rows of data while ( have_rows( 'questions', 'user_' . $userid ) ) { the_row(); $termtaxid = get_sub_field( 'question', 'users_' . $userid ); $answer = get_sub_field( 'answer', 'user_' . $userid ); //check if they answered this question if ( $termtaxid === $termid && $answer ) { // answer $the_answers .= '
'; $the_answers .= '
'; $the_answers .= auto_link_text( wp_kses_post( $answer ) ); $the_answers .= '
'; // user attribution - photo and name and link (only if they want to be listed in directory) $in_directory = get_field( 'in_directory', 'user_' . $userid ); if ( 'true' === $in_directory || 'website' === $in_directory || ( 'private' === $in_directory && is_user_logged_in() ) ) { $username = esc_html( $user->nickname ); $the_answers .= ''; $the_answers .= ''; $the_answers .= wasmo_get_user_image( $userid ); $the_answers .= ''; $the_answers .= '' . $username . ''; $the_answers .= ''; $the_answers .= ''; } elseif ( 'false' === $in_directory || ( 'private' === $in_directory && !is_user_logged_in() ) ) { $the_answers .= ''; $the_answers .= ''; $the_answers .= ''; $the_answers .= wasmo_get_user_image( 0 ); $the_answers .= ''; $the_answers .= 'Anonymous'; $the_answers .= ''; $the_answers .= ''; } $the_answers .= '
'; } } } } set_transient( $transient_name, $the_answers, 24 * HOUR_IN_SECONDS ); } ?>

There are no available answers for this question currently. Add your own story and be the first to contribute your own answer to the question!