Support

Home Forums Custom Files Add-on (EE3) Sortby location city

Sortby location city

Posted: August 19, 2014 at 10:11 am


Marla Wingfield

August 19, 2014 at 10:11 am

I have a page with a sub navigation designed to sort the events:


                        <div class="entry-content">

                                <?php
                                if(isset($_GET['calendar'])){

                                    echo do_shortcode('[ESPRESSO_CALENDAR show_expired="true"]');
                                }else{
                                ?>
                                    <ul class="events">
                                    <?php
                                        //display_all_events();
                                        switch($_GET['sort']){
                                            case 'location':

                                                echo do_shortcode("[EVENT_LIST show_expired=false show_secondary=true show_recurrence=true order_by=city]");

                                                break;
                                            case 'title':

                                                echo do_shortcode("[EVENT_LIST show_expired=false show_secondary=true show_recurrence=true order_by=event_name]");

                                                break;
                                            case 'upcoming':
                                            default:

                                                echo do_shortcode("[EVENT_LIST show_expired=false show_secondary=true show_recurrence=true order_by=date(start_date),id]");
                                                break;
                                        }

                                    ?>
                                    </ul>
                                <?php } ?>
                                <?php the_content(); ?>
                        </div>

The problem is that the location case doesn’t work. Originally the value in the short-code was ‘location’ but I have since changed it to ‘city’ because that is specifically what I want it to sort by but it does not return correctly. This is a theme file located in /themes/rei/page-events.php

Any ideas?


Marla Wingfield

August 19, 2014 at 10:29 am

echo do_shortcode(“[EVENT_LIST show_expired=false show_secondary=true show_recurrence=true order_by=venue_city]”);

The support post ‘Sortby location city’ 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