• sosa3432

    (@sosa3432)


    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?
    Thanks!

    http://wordpress.org/extend/plugins/event-organiser/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Stephen Harris

    (@stephenh1988)

    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?

    Thread Starter sosa3432

    (@sosa3432)

    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 😉

    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.

    Thread Starter sosa3432

    (@sosa3432)

    Aha I see! Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Event Organiser] Event organiser archive page does not show "nothing found"’ is closed to new replies.