Events showing No Events Found

I have two issues.

First, the really problematic one:
My main events archive page now shows "No Event Found." http://dev.prometheusfire.me/newsline-development/events/

Additionally, when passed year (say when browsing from the breadcrumb) it does the same. However, with a month in the URL, it displays my events. http://dev.prometheusfire.me/newsline-development/events/2014/08/

I am using a custom archive-incsub_event.php in my child theme. You can see the code for it here: http://pastebin.com/h80T7SEz

I have tried the Default to All Events addon, but that shows everything including expired events. Showing past events here is not ideal, since they will begin to pile up quickly for this particular client.

Second problem:
When browsing events based on date, it does use my custom archive-incsub_event.php; however, when browsing based on event category, it uses my theme's archive.php. Ex. http://dev.prometheusfire.me/newsline-development/events/conference/

Is there a way to handle this, I want all events post type archives to use my custom template file.

This is a testing/development site. I've activated support access for it in the WPMU DEV dashboard, please feel free to poke around and have a look.

  • Ash
    • WordPress Hacker

    Hello @Saunt Valerian

    I hope you are well today and thanks for asking the question.

    My main events archive page now shows "No Event Found."

    when passed year (say when browsing from the breadcrumb) it does the same. However, with a month in the URL, it displays my events.

    Would you please deactivate all other plugins and activate the default WP 2012 theme? Just want to make sure if it is a conflict or not.

    I have tried the Default to All Events addon, but that shows everything including expired events. Showing past events here is not ideal, since they will begin to pile up quickly for this particular client.

    Yes, I see the same in my test site. Let me ask a SLS developer about this.

    When browsing events based on date, it does use my custom archive-incsub_event.php; however, when browsing based on event category, it uses my theme's archive.php.

    In that case, you need to create another page template, with the name "taxonomy-eab_events_category.php"

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • Saunt Valerian
    • The Bug Hunter

    On the first issue:
    I deactivated all the plugins and switched themes - it had no effect. The No event found was still there.

    Second issue:
    I created taxonomy-eab_events_category.php and am getting it working. I'm having some strange CSS issues with it however (which I shouldn't have since all I did was copy over my other custom archive file). I've I can't get those CSS issues figured out, I fill open a new topic referring back to this.

    The second issue I noted above is solved for now, the primary issue is not.

  • Ash
    • WordPress Hacker

    This is because you have no events in current month. Would you please add this code in your theme's functions.php: https://github.com/bappi-d-great/wpmu-events-archive/blob/master/codes

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • Saunt Valerian
    • The Bug Hunter

    Excellent. Thank you for this. That's a perfect fix.

    I would add my vote that this piece of code should make it into the core plugin. The way it is handled now causes confusion. If display of the events is based on the current month by default, then when you reach the end of a month and the events are dated for the next month, you would still get nothing, but you would get nothing displayed in a timeframe when the event could only be a few days away. I would argue that the main events page should always show whatever is upcoming.

    Either way, whatever is decided, thank you for providing this fix for me!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.