</span> </div> </div> <div class="bottom"> <div class="clearfix"></div> <h4 class="event-title"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h4> <div class="clearfix"></div> <div class="tribe-events-event-details tribe-clearfix <?php if (empty($featured_image)) { echo 'no-image'; } ?> "> <div class="tribe-events-content entry-summary description"> <?php echo training_wpo_excerpt(22, '...'); ?> </div> </div> </div> </div> </div> </div>
/** * storeed maching teacher by id as global which will be used in next */ function training_wpo_ib_get_teachers_matches($userId) { global $Training_WPO_Teachers_matches, $post; if (!isset($Training_WPO_Teachers_matches[$userId])) { $data = array('name' => '', 'link' => '', 'description' => ''); $user = get_user_by('id', $userId); $args = array('post_type' => 'teacher', 'posts_per_page' => 1, 'meta_query' => array(array('key' => '_relateduser', 'value' => $userId))); $loop = new WP_Query($args); if ($loop->found_posts) { while ($loop->have_posts()) { $loop->the_post(); $Training_WPO_Teachers_matches[$userId] = array('teacher_id' => get_the_id(), 'name' => $user->display_name, 'description' => training_wpo_excerpt(18, '...'), 'link' => get_permalink(get_the_ID())); break; } } else { $Training_WPO_Teachers_matches[$userId] = array('teacher_id' => get_the_id(), 'name' => $user->display_name, 'description' => training_wpo_excerpt(18, '...'), 'link' => get_author_posts_url($userId)); } } wp_reset_postdata(); return $Training_WPO_Teachers_matches[$userId]; }
<div class="teacher-body-content"> <h3 class="teacher-name"><a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a></h3> <p class="teacher-position"><?php echo trim($teacher->meta('job')); ?> </p> </div> <div class="teacher-info"> <?php echo training_wpo_excerpt(16, '...'); ?> </div> <div class="bo-social-icons text-left"> <?php if ($teacher->meta('facebook')) { ?> <a href="<?php echo esc_url($teacher->meta('facebook')); ?> " class="bo-social-facebook bo-social-white"><i class="fa fa-facebook"></i></a> <?php } ?> <?php if ($teacher->meta('twitter')) {
<span class="author-link"><?php esc_html_e('By ', 'training'); the_author_posts_link(); ?> </span> <span class="meta-sep space-padding-lr-5"> . </span> <span class="comment-count"> <?php comments_popup_link(esc_html__(' 0 comment', 'training'), esc_html__(' 1 comment', 'training'), esc_html__(' % comments', 'training')); ?> </span> </div> <p class="entry-content"> <?php echo training_wpo_excerpt(32); ?> </p> <div class="entry-link"> <a href="<?php the_permalink(); ?> " class="btn btn-outline"><?php echo esc_html__('read more', 'training'); ?> </a> </div> </div> </div> </div>
?> </div> <ul class="entry-comment list-inline"> <li class="comment-count"> <?php comments_popup_link(esc_html__(' 0 ', 'training'), esc_html__(' 1 ', 'training'), esc_html__(' % ', 'training')); ?> </li> </ul> <div class="entry-create"> <span class="author"><?php echo esc_html_e('By ', 'training'); the_author_posts_link(); ?> </span> <span class="entry-date"><?php the_time('M d, Y'); ?> </span> </div> </div> <p class="entry-description"><?php echo training_wpo_excerpt(40, '...'); ?> </p> </div> </div> </article>
<?php $classes = apply_filters('ib_educator_course_classes', array('course')); $classes[] = 'course-item'; $categories = ''; $separator = ', '; $title = get_the_title(); $link = get_the_permalink(); $terms = get_the_terms(get_the_id(), 'ib_educator_category'); $options = get_post_meta(get_the_id(), 'wpo_postconfig', true); $post_id = get_the_id(); $excerpt = training_wpo_excerpt(22, '...'); if (!empty($terms) && !is_wp_error($terms)) { foreach ($terms as $term) { $categories .= $term->name . $separator; } } $categories = trim($categories, $separator); $educator = IB_Educator::get_instance(); $lesson = $educator->get_num_lessons(get_the_id()); ?> <article id="course-<?php the_ID(); ?> " class="<?php echo esc_attr(implode(' ', $classes)); ?> "> <?php if (has_post_thumbnail()) { ?>
?> </span> <?php if (is_tag()) { ?> <span class="meta-sep"> / </span> <span class="tag-link"><?php the_tags('Tags: ', ', '); ?> </span> <?php } ?> </div> </div> <div class="entry-content"> <?php echo training_wpo_excerpt(20); ?> </div> <div class="entry-link"> <a href="<?php the_permalink(); ?> " class="btn btn-outline"><?php echo esc_html__('read more', 'training'); ?> </a> </div> </div> </article>