Display message if no event in tag

Home Forums Calendar Products Events Calendar PRO Display message if no event in tag

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #967943
    Erin Slater
    Participant

    I created links to tags I have setup. However, since the site is new, some of the tags do not have any events. Therefore, I would like the “no events found” message to appear when the user visits a tag page with no events.

    Here is an example of a tag with no events: http://anz.isagenixevents.com/tag/vic

    You can see how the page is blank.

    Thanks,
    Brendan

    #968100
    Nico
    Member

    Hi Brendan,

    Thanks for reaching out. Let me explain one thing before we jump into the actual solution of your issue: Events tags are regular WordPress tags. That being said we can move on.

    Create a ‘tag.php’ file in your theme (you can copy ‘archive.php’ is it exists). The loop structure should look like this:


    <?php
    if ( have_posts() ) :
    /* there are posts for this tag */
    while ( have_posts() ) : the_post();
    /* print post */
    endwhile;
    else :
    /* there are no posts for this tag */
    echo 'No posts found for this tag';
    endif;
    ?>

    Please try this on you end and let me know if it works,
    Best,
    Nico

    #970992
    Erin Slater
    Participant

    Hi Nico,

    I see. After looking again I realized that the tags were part of wordpress and not hooked into your plugin. Therefore, in order to keep a clean look, I decided to go with Event Categories which work a lot better for what I was trying to accomplish.

    Thanks,
    Brendan

    #970997
    Nico
    Member

    That’s great Brendan, glad you could solve it that way!

    I’m going to close this topic – but please don’t hesitate to create new topics if you need help with anything else.

    Best,
    Nico

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Display message if no event in tag’ is closed to new replies.