Support

Home Forums Event Espresso Premium ee4-genesis archive pages

ee4-genesis archive pages

Posted: October 31, 2014 at 10:03 am

Viewing 1 reply thread


Michael

October 31, 2014 at 10:03 am

Hi. I’m using the following code in my child theme archive-espresso_events page, but I can’t figure out how to:
order the posts by start date
filter expired posts
My goal is to use this for Event Category ‘tag’ pages.

Alternatively, I tried using the shortcode
echo do_shortcode( ‘[ESPRESSO_EVENTS order_by=”start_date”]’ );
But I couldn’t make it work with
genesis();
The code worked, but it was completely unformatted and without layout

`function my_custom_loop() {
if ( have_posts() ) : ?>

<?php
// allow other stuff
do_action( ‘AHEE__archive_espresso_events_template__before_loop’ );

// Start the Loop.
while ( have_posts() ) : the_post();
// Include the post TYPE-specific template for the content.
espresso_get_template_part( ‘content’, ‘espresso_events’ );

endwhile;
// Previous/next page navigation.

// allow moar other stuff
do_action( ‘AHEE__archive_espresso_events_template__after_loop’ );

else :
// If no content, include the “No posts found” template.
espresso_get_template_part( ‘content’, ‘none’ );

endif;
}

/** Replace the standard loop with our custom loop */
remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
add_action( ‘genesis_loop’, ‘my_custom_loop’ );

genesis();’


Josh

  • Support Staff

October 31, 2014 at 3:47 pm

Hi Michael,

Here are a few tips I can share:

1) You can make a copy of your archive-espresso_events.php template and rename the copy to be taxonomy-espresso_event_categories.php. This way you’ll have a specific template for the event category archives.

2) We’re working on changing the default ordering for the category archives for the next version of Event Espresso 4, but you can use these filter functions in the meantime:

https://gist.github.com/joshfeck/440bf1c01ede03458b3d

Viewing 1 reply thread

The support post ‘ee4-genesis archive pages’ 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.

Event Espresso