Instructors Sidebar not Displaying Correctly in Course Listing

If you look on this course page: https://bmcacademy.barlowmccarthy.com/course-catalog/getting-ahead-of-turnover-with-new-recruits/

You will see that the instructor sidebar isn't lining up very good. I get one instructor, plus the long description and then my other instructor doesn't show up? I would like to remove the Instructor profile so that I just have the Name, Photo, and Link to Profile.

However, I would like to keep the full profile on Single instructor courses.

Let me know if that makes sense or if I need to clarify more. I will open up access.

Thanks!
Tony

    Nithin

    Hi Tony,

    Hope you are doing good today.

    Please create a child theme, and add the file content-course-overview.php, with the following code to it:

    <?php
    /**
     * @package CoursePress
     */
    ?>
    <?php
    $course = new Course( get_the_ID() );
    
    $course_category_id	 = $course->details->course_category;
    $course_category	 = get_term_by( 'ID', $course_category_id, 'course_category' );
    
    $course_language = $course->details->course_language;
    ?>
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <header class="entry-header">
            <h1 class="entry-title"><?php the_title(); ?></h1>
            <div class="instructors-content">
    			<?php echo do_shortcode( '[course_instructors list="true" link="true"]' ); ?>
            </div>
        </header><!-- .entry-header -->
    
        <section id="course-summary">
    
    		<?php
    		$course_media	 = do_shortcode( '[course_media]' );
    		if ( $course_media !== '' ) {
    			?>
    			<div class="course-video">
    				<?php
    				// Show course media
    				echo $course_media;
    				?>
    			</div>
    		<?php } ?>
    
            <div class="entry-content-excerpt <?php echo ($course_media == '' ? 'entry-content-excerpt-right' : '' ); ?>">
    			<?php //the_excerpt();   ?>
                <div class="course-box">
    				<?php echo do_shortcode( '[course_dates show_alt_display="yes"]' ); //change to yes for 'Open-ended' ?>
    				<?php echo do_shortcode( '[course_enrollment_dates show_alt_display="no"]' ); //change to yes for 'Open-ended' ?>
    				<?php echo do_shortcode( '[course_class_size]' ); ?>
    				<?php echo do_shortcode( '[course_enrollment_type label="'.__('Who can Enroll: ', 'cp').'"]' ); ?>
    				<?php echo do_shortcode( '[course_language]' ); ?>
    				<?php echo do_shortcode( '[course_cost]' ); ?>
    
                </div><!--course-box-->
                <div class="quick-course-info">
    				<?php // echo do_shortcode('[course_details field="button"]'); ?>
    				<?php echo do_shortcode( '[course_join_button]' ); ?>
                </div>
            </div>
        </section>
    
        <section id="additional-summary">
            <div class="social-shares">
                <span><?php _e( 'SHARE', 'cp' ); ?></span>
                <a href="http://www.facebook.com/sharer/sharer.php?s=100&p[url]=<?php the_permalink(); ?>&p[images][0]=&p[title]=<?php the_title(); ?>&p[summary]=<?php echo urlencode( strip_tags( get_the_excerpt() ) ); ?>" class="facebook-share" target="_blank"></a>
                <a href="http://twitter.com/home?status=<?php the_title(); ?> <?php the_permalink(); ?>" class="twitter-share" target="_blank"></a>
                <a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" class="google-share" target="_blank"></a>
                <a href="mailto:?subject=<?php the_title(); ?>&body=<?php echo strip_tags( get_the_excerpt() ); ?>" target="_top" class="email-share"></a>
            </div><!--social shares-->
        </section>
    
        <br clear="all" />
    
    	<?php
    	$instructors = Course::get_course_instructors( $course->details->ID );
    	?>
        <div class="entry-content <?php echo( count( $instructors ) > 0 ? 'left-content' : '' ); ?>">
            <h1 class="h1-about-course"><?php _e( 'About the Course', 'cp' ); ?></h1>
    		<?php the_content(); ?>
    		<?php if ( $course->details->course_structure_options == 'on' ) { ?>
    			<h1 class = "h1-about-course"><?php
    				_e( 'Course Structure', 'cp' );
    				?></h1>
    			<?php
    			// $course->course_structure_front();
    			echo do_shortcode( '[course_structure label="" show_title="no" show_divider="yes"]' );
    		}
    		?>
    		<?php
    		wp_link_pages( array(
    			'before' => '<div class="page-links">' . __( 'Pages:', 'cp' ),
    			'after'	 => '</div>',
    		) );
    		?>
        </div><!-- .entry-content -->
    
    	<?php if ( count( $instructors ) > 0 ) { ?>
    		<div class="course-instructors right-content">
    			<h1 class="h1-instructors"><?php _e( 'Instructors', 'cp' ); ?></h1>
    			<script>
    				jQuery( function() {
    					jQuery( "#instructor-profiles" ).accordion( {
    						heightStyle: "content"
    					} );
    				} );
    			</script>
    			<div id="instructor-profiles">
    				<?php
    				foreach ( $instructors as $instructor ) {
    					?>
    
    					<h3><?php echo $instructor->display_name; ?></h3>
    
    					<?php
    					$doc		 = new DOMDocument();
    					$doc->loadHTML( get_avatar( $instructor->ID, 235 ) );
    					$imageTags	 = $doc->getElementsByTagName( 'img' );
    
    					foreach ( $imageTags as $tag ) {
    						$avatar_url = $tag->getAttribute( 'src' );
    					}
    					?>
    
    					<div>
    						<img src="<?php echo $avatar_url; ?>" />
    
    						<a href="<?php echo do_shortcode( '[instructor_profile_url instructor_id="' . $instructor->ID . '"]' ); ?>" class="full-instructor-profile"><?php _e( 'View Full Profile', 'cp' ); ?></a>
    					</div>
    				<?php } ?>
    			</div>
    
    		</div><!--course-instructors right-content-->
    	<?php } ?>
        <br clear="all" />
    
        <footer class="entry-meta">
    		<?php
    		/* translators: used between list items, there is a space after the comma */
    		$category_list = get_the_category_list( __( ', ', 'cp' ) );
    
    		/* translators: used between list items, there is a space after the comma */
    		$tag_list = get_the_tag_list( '', __( ', ', 'cp' ) );
    
    		if ( !coursepress_categorized_blog() ) {
    			// This blog only has 1 category so we just need to worry about tags in the meta text
    			if ( '' != $tag_list ) {
    				$meta_text = __( 'This entry was tagged %2$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'cp' );
    			} else {
    				//$meta_text = __( 'Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'cp' );
    				$meta_text = '';
    			}
    		} else {
    			// But this blog has loads of categories so we should probably display them here
    			if ( '' != $tag_list ) {
    				$meta_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'cp' );
    			} else {
    				$meta_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" rel="bookmark">permalink</a>.', 'cp' );
    			}
    		} // end check for categories on this blog
    
    		printf(
    		$meta_text, $category_list, $tag_list, get_permalink()
    		);
    		?>
    
    		<?php edit_post_link( __( 'Edit', 'cp' ), '<span class="edit-link">', '</span>' ); ?>
        </footer><!-- .entry-meta -->
    </article><!-- #post-## -->

    If you are not sure about creating a child theme, please try the following attached child theme for reference, with the above changes to it.

    I hope this helps. Please let us know if you still need any further assistance. Have a nice day.

    Kind Regards,
    Nithin

    Tony

    Hi Nithin,
    I gave this a shot and I do see a change but we aren't quite achieving what we need to. If you look here: https://bmcacademy.barlowmccarthy.com/course-catalog/getting-ahead-of-turnover-with-new-recruits/ you will see that we have the profile taken off of the sidebar but the Kriss Barlow picture and profile link aren't showing up? Ideally I would have both images and both links to their profiles.
    Thanks!
    Tony

    Nithin

    Hi Tony,

    Hope you are doing good today.

    It seems like the mentioned profile is being removed by an inline class style, and hence the profile, and link are not visible. Could you please try the following code, and check whether it works.

    .ui-accordion .ui-accordion-content  {
    	display: block !important;
    }

    However the use of !important declaration is not something which I would recommend, but in some cases's it's necessary to apply these rules to overwrite the existing styles.

    You can add the above CSS code, using Custom CSS box(if your theme offers), or either using a Child theme, or a plugin like Simple Custom CSS.

    Please let us know if you still need any further assistance. Have a nice day.

    Kind Regards,
    Nithin

    Tony

    Hello Nithin,
    This did work to get them displaying correctly. However, if you look at the page (https://bmcacademy.barlowmccarthy.com/course-catalog/getting-ahead-of-turnover-with-new-recruits/) you will see that we have some strange behavior. The header "Kriss Barlow" is a hyperlink, when you click it the kind of flip around and the hyperlink shifts to the other name. Any way to eliminate this?
    Thanks!
    Tony