Posted: October 1, 2020 at 4:30 am
Hi I’ve been through – https://eventespresso.com/wiki/ee4-custom-post-types/#archive_event_template and created a new archive template. Adding a different title and a company logo. https://www.the-ta.com/upcoming-events/ The new template has though changed the layouts of new events in the archive list. I didn’t change any of the other code. Really stuck and scratching my head. Here is the code form the template file below. Thanks so much in advance guys. Regards Mark – <?php get_header(); $blog_type = ‘standard’; // standard, grid, masonry. $class = ”; if ( ‘masonry’ === $blog_type ) { <div id=”primary” class=”content-area”> <?php if ( have_posts() ) : ?> <div class=”container”> <h2 class=”eventtitle” align=”left”><br>Upcoming Events </h2> </div> <div class=”post-grid <?php echo esc_attr( $class ); ?>”> <?php if ( ‘masonry’ === $blog_type ) { ?> <?php /* endwhile; <?php else : <?php endif; ?> </main><!– #main –> <?php get_sidebar(); ?> <?php |
|
Hi I’ve been through – https://eventespresso.com/wiki/ee4-custom-post-types/#archive_event_template and created a new archive template. Adding a different title and a company logo. https://www.the-ta.com/upcoming-events/ The new template has though changed the layouts of new events in the archive list losing the View more, date and view details. I didn’t change any of the other code. Really stuck and scratching my head. Here is the code form the template file below. Thanks so much in advance guys. Regards Mark – <?php get_header(); $blog_type = ‘standard’; // standard, grid, masonry. $class = ”; if ( ‘masonry’ === $blog_type ) { <div id=”primary” class=”content-area”> <?php if ( have_posts() ) : ?> <div class=”container”> <h2 class=”eventtitle” align=”left”><br>Upcoming Events </h2> </div> <div class=”post-grid <?php echo esc_attr( $class ); ?>”> <?php if ( ‘masonry’ === $blog_type ) { ?> <?php /* endwhile; <?php else : <?php endif; ?> </main><!– #main –> <?php get_sidebar(); ?> <?php |
|
Hi there, Sounds like your theme may be using a different template than the one you copied. Which template did you copy to create Rename that template to something other than the above, add a ‘2’ or ‘temp’ to the filename:
That will deactivate your template and switch back to whatever your theme used normally, let me know when that has been done and I’ll take a look at the page to see if anything stands out. |
|
Hi there is used the file – archive.php I-ve changes the new template file to archive-espresso_events-temp.php It’s taken off the Title and logo I’ve added to the template but the new test events still have the different layouts – https://www.the-ta.com/upcoming-events/ Thanks for having a look. Regards Mark |
|
So it can’t be the template file. Now im really scratching my head ๐ |
|
Ok, so the only change you’ve made is to copy the
to your theme’s The template is currently renamed, right? So, now comment out the above code (add |
|
Hi, I’m at the point again and it’s still wrong so not a template problem. Do you have other ideas? Its strange the old one works ok but its only new ones. I brought an old event back – Retail & E-Commerce in Egypt and that workes fin in the archive. Thanks for your help. Regards |
|
Ok so this can’t be from changing the template then as all of that has now been removed. Does your theme add options to each individual EE event when you edit the event? |
|
OK figured it out. Phew, the client was adding some text into the Excerpt and that was hijacking the Preview in Archive view. Sorry, we went so far from that, thanks for bearing with me and getting me there. |
|
Ahhh, yeah ok. That makes sense now. Glad you found it ๐ |
|
The support post ‘Create an archive template but new events are now showing differently’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.