Layout of events below venue page

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 4 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #37411

    On the venue pages there is the list of events happening at that venue.
    The list is a vertical list in a single column with tiny “later events” link at the bottom.

    Can this list be formatted? i.e. 2 or 3 columns sand and show all events without pagination please?

    Garry Kelsall
    #37477

    Hi Garry,

    The plug-in just uses the theme’s page.php layout and injects content in a simple list by default (with little to no styling applied by the plug-in).

    However you can copy the templates to your theme and edit it them, and in doing so, format it in anyway you’d like. Some more information is available here: http://docs.wp-event-organiser.com/theme-integration/how-do-i-customise-the-templates/ – however the details of how to achieve a multi-column layout will depend on your theme.

    In your case you’d probably want to edit taxonomy-event-venue.php – when copied to your theme it will be responsible for rendering the entire event venue page, so you’d need to edit this template to reflect your theme. You might get away with just copying eo-loop-events.php to your theme and editing that – that template is responsible for displaying the events (note: its used on the events pages, event category pages etc as well)

    In order to display all events on the event venue page, the following should work:

    add_action('pre_get_posts', function($query){
            if(!$query->is_main_query()){
                    return;
            }
    
            if(!eventorganiser_is_event_query($query, true)){
                    return;
            }
    
            if (!$query->is_tax('event-venue')) {
                    return;
            }
            $query->set('posts_per_page', -1);
    }, 12);
    
    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.