Home › Forums › Calendar Products › Events Calendar PRO › move the featured image to below the "heading / date box"
- This topic has 5 replies, 2 voices, and was last updated 8 years, 9 months ago by
Jennifer.
-
AuthorPosts
-
July 21, 2017 at 12:35 am #1324227
Helli Meinecke
ParticipantHello,
We are using The Events Calendar with Avada.
At the moment the featured image is inserted above the “heading / date box” on the single event page.
What we want to do is move the featured image to below the “heading / date box” (but keep the text styling etc the same)
See attached screencap.
I can see the featured image code in single-event.php – it sits above the event content:
<!-- Event featured image, but exclude link --> <?php echo tribe_event_featured_image( $event_id, 'full', false ); ?> <!-- Event content --> <?php do_action( 'tribe_events_single_event_before_the_content' ) ?> <div class="tribe-events-single-event-description tribe-events-content"> <?php the_content(); ?> </div> <!-- .tribe-events-single-event-description --> <?php do_action( 'tribe_events_single_event_after_the_content' ) ?>If I move the featured image lines inside the content bit I lose the nice greenbox and the spacing goes funny.
<!-- Event content --> <?php do_action( 'tribe_events_single_event_before_the_content' ) ?> <div class="tribe-events-single-event-description tribe-events-content"> <!-- Event featured image, but exclude link --> <?php echo tribe_event_featured_image( $event_id, 'full', false ); ?> <?php the_content(); ?> </div>Any ideas on how to get this working nicely so we still have the nice green heading box and the featured image is inserted below that?
Would appreciate some expert help.
Thanks.
July 22, 2017 at 10:29 pm #1325017Jennifer
KeymasterHi Joanne,
Thanks for reaching out!
It looks like the styling issue may be coming from your placement of the featured image…try adding it below the closing div tag, instead of inside the div as you have it currently:
<!-- Event content -->
<?php do_action( 'tribe_events_single_event_before_the_content' ) ?>
<div class="tribe-events-single-event-description tribe-events-content">
<?php the_content(); ?>
</div><!-- Event featured image, but exclude link -->
<?php echo tribe_event_featured_image( $event_id, 'full', false ); ?><!-- .tribe-events-single-event-description -->
<?php do_action( 'tribe_events_single_event_after_the_content' ) ?>Let me know if that works!
Thanks,
Jennifer
July 23, 2017 at 10:16 pm #1325183Helli Meinecke
ParticipantHi Jennifer,
Thanks for your help.
Actually that also causes the nice green heading box to be lost.
So then I tried a simple test – uploading an exact copy of “single-event.php” file from “/public_html/wp-content/plugins/the-events-calendar/src/views/” into our tribe-events template folder located at “/public_html/wp-content/themes/Avada-Child-Theme/tribe-events/” folder. When I do this we also lose the nice green heading box (and the side bar content is repeated below the content in the LHS column). When I delete the exact copy (so there is no “single-event.php” in the “/public_html/wp-content/themes/Avada-Child-Theme/tribe-events/” folder), the nice green heading box comes back. Something weird is going on. See attached image for a visual.
Any ideas?
Thanks.
July 26, 2017 at 3:14 am #1326253Jennifer
KeymasterHi Jo-Anne,
I’m sorry I should have mentioned before that Avada actually adds its own templates for our plugins, which can be found under wp-content/themes/Avada/tribe-events. You’ll see another single-event.php template (as well as several other template files) there.
Can you try copying that template into your child theme and see if you are able to edit it that way? Let me know how it goes!
Thanks,
Jennifer
July 26, 2017 at 5:31 pm #1326679Helli Meinecke
ParticipantHi Jennifer,
Ahhhhhh, that explains things.
Thanks, I have got this working now.
Cheers for your help.
July 27, 2017 at 9:15 pm #1327273Jennifer
KeymasterAwesome, glad to hear it’s working now!
I’ll go ahead and close out this thread, but please feel free to open a new one if you have any further questions!
-
AuthorPosts
- The topic ‘move the featured image to below the "heading / date box"’ is closed to new replies.
