Display featured image instead of the speakers image on the schedule widget

  1. Home
  2. Docs
  3. Vertoh
  4. Frequently Asked Question...
  5. Display featured image instead of the speakers image on the schedule widget

Display featured image instead of the speakers image on the schedule widget

Please follow the steps below:

1) Please do remember to back-up the file prior to any changes.

2) Copy wp-content/themes/vertoh/components/templates/widgets/ef_schedule.php to wp-content/themes/vertoh-child/components/templates/widgets/ef_schedule.php if the file is not already exist in the child theme.

3) Open wp-content/themes/vertoh-child/components/templates/widgets/ef_schedule.php

4) Around line number 63, you can find:

<div class=”sessions-images<?php if ($speakers_list && count($speakers_list) > 2) echo ‘ many-images’; ?>”>
<?php
if ($speakers_list && count($speakers_list) > 0) {
foreach ($speakers_list as $speaker_id) {
?>
<a href=”<?php echo get_permalink($speaker_id); ?>”<?php if (get_post_meta($speaker_id, ‘speaker_keynote’, true) == 1) echo ‘ class=featured’; ?>>
<?php echo get_the_post_thumbnail($speaker_id, ‘vertoh-speaker’, array(‘class’ => ‘scalable-image session-image’, ‘alt’ => get_the_title($speaker_id))); ?>
</a>
<?php
}
}
?>
</div>

5) Please replace this with:

<div class=”sessions-images”>
<?php

if(has_post_thumbnail( $session->ID )) { echo get_the_post_thumbnail($session->ID); }

?>
</div>

6) Save the file.

7) Go to Appearance->editor->style.css

8) Add the following code to the end of the style-sheet:

section.fullwidth .carousel-sessions .sessions-images > img, section.fullwidth .carousel-sessions .sessions-images a {width:100%;}

9) Save the file.

Was this article helpful to you? Yes 1 No