Display Feature Image Instead of Maps on Archive Pages
-
As an inexperienced php coder, I am seeking help.
I am using a theme, named Blessing, by Thememakers, in which the Events List page (archive of all events) displays a map for each event.
I am able to assign a Featured Image for each event, but when I try to edit the code for the event list, replacing the map loop with one to display the featured image, some featured images display, but it seems to get the ID’s mixed up. They are all displaying the incorrect images, as if they are swapped for one another.
Page is here:
https://martinacenter.com/retreats-and-events/events-list/This is the code I have put in place: <?php if (!$hide_event_place) : ?> <div class="gmaps"> <div class="bordered"> <figure class="add-border"> <img src="<?php echo ThemeMakersHelper::get_post_featured_image($post->ID, 574, true, 258); ?>" alt="<?php the_title(); ?>" /> </figure> </div><!--/ .bordered--> </div> <?php endif; ?>
Screenshot of the entire edited php file here:
https://snag.gy/X5B6b.jpgAnyone have ideas why the wrong feature image is being displayed?
Thank you!
- The topic ‘Display Feature Image Instead of Maps on Archive Pages’ is closed to new replies.