Too many events on one day, just show link

Home Forums Calendar Products Events Calendar PRO Too many events on one day, just show link

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #75277
    Briston
    Participant

    Greetings,
    I’m having some trouble and cannot find precedent for my situation on these forums. My outfit has what is called first friday and there are up to 50 events that day. I’m interested in learning how to identify the first friday of each month and rather than list out all the events, just show a link to the day instead. Any help / precedents is appreciated.

    thanks,

    #75293
    Leah
    Member

    Hi Briston,

    Thanks for getting in touch. We’d be happy to help out with your unique events 🙂

    Can you tell me a little bit more about what you’re looking for? I’m not sure I completely understand what you mean by a link to the day. Are you saying the you’d like the Month View to only have one event listed, First Friday, and have that link to a Day View which shows all the First Friday events? Or am I misunderstanding?

    Best,
    Leah

    #75372
    Briston
    Participant

    Hi Leah,
    You are right on the money with what I”m trying to do. Instead of listing any events, I’d like to just list “first friday” and link that to the day view. I’ve tried the code below to no avail (views/month/single-day.php):

    if ( !defined(‘ABSPATH’) ) { die(‘-1’); } ?>


    <div id="tribe-events-daynum-“>
    <a href="”>

    format( ‘M j’ )) == strtotime( $date_to_check )) :
    //echo “first friday!!!”;
    return true;
    else : // aint first friday chief
    return false;
    endif;

    }
    ?>
    First Friday<a href="”>View Events


    have_posts()) : $day[‘events’]->the_post(); ?>

    #75374
    Briston
    Participant

    Lets try the code part again I’ve added this underneath the header in month/single-day.php:
    First Friday<a href="”>View Events


    have_posts()) : $day[‘events’]->the_post(); ?>

    #75375
    Briston
    Participant

    OK no posting code here i guess 🙁 sad trombone.

    #75425
    Leah
    Member

    Sorry Briston, the forum doesn’t take pasted code well. Can you use something like pastebin to show us what you used?

    Thanks!
    Leah

    #75658
    Briston
    Participant
    #75800
    Leah
    Member

    Thanks Briston! I’m going to have one of my colleagues step in here and take a look at that code. Thanks for your patience while we dig into this.

    Best,
    Leah

    #75863
    Barry
    Member

    Hi Briston,

    Basically looks sound in concept to me so if it isn’t returning the expected results in your case you would need to A) ensure your PHP datetime settings are accurate B) confirm what is being passed in to the function (strtotime() in particular only accepts a limited range of date formats so the value of $date_to_check is worth a close look) and C) consider the context it is being used in.

    Unfortunately based on the snippet you shared alone it’s not possible to tell you much more – plus we’re really in the realms of custom development here and we will ultimately have to let you figure out the details – and so I’ll go ahead and close this thread.

    Good luck!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Too many events on one day, just show link’ is closed to new replies.