Event Organiser
Event organiser archive page does not show "nothing found" (5 posts)

  1. sosa3432
    Posted 4 years ago #

    I'm running Event Organiser 1.3.2 on WP 3.3.1
    I've created an archive page to list events, but even though there are no events the page does not show the "sorry nothing found" message.

    The archive-event.php file starts with a "<?php if ( have_posts() ) : ?>" and then the "nothing found" output stuff is written below in the "else" section. However, from what I can see the first "if" validates as true even though there are no posts and the else command is never executed.

    Any suggestions?


  2. Stephen Harris
    Posted 4 years ago #

    I've just checked this on my install - and it works for me. What do you see in the case where there are no events? Have you tried var_dumping the global wp_query?

  3. sosa3432
    Posted 4 years ago #

    Hm.. in some cases it seems to be showing the page's title as an article. (I created a new empty page in the admin panel and then applied archive-event as a template on that page. But it seems to show the page's title as an entry-title. )

    I tried doing a var_dump, but I didn't really understand the results...

    I think I'm just going to leave this be, I found some other stuff I need to fix instead. Thanks and see you in another post if I can't figure it out myself ;)

  4. Stephen Harris
    Posted 4 years ago #

    Just to clarify archive-event.php is not a page template in the sense that you create a page and assign that template to it. It is the event post type equivalent of 'archive.php' or (a bit less like) index.php. WordPress (can) automatically generate archives for your post types, and archive-{post_type}.php is the template it tries to use.

    So the archive should automatically be 'created' (it won't appear as a page) - but if you go to www.yoursite.com?post_type=event (or the 'pretty url' equivalent) it will appear there.

    Unless also present in your theme/child-theme, it will use the archive-event.php template in the plug-in files.

  5. sosa3432
    Posted 4 years ago #

    Aha I see! Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Event Organiser
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic