Home › Forums › Calendar Products › Events Calendar PRO › Too many events on one day, just show link
- This topic has 8 replies, 3 voices, and was last updated 10 years, 5 months ago by Barry.
-
AuthorPosts
-
November 7, 2013 at 3:33 pm #75277BristonParticipant
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,
November 7, 2013 at 4:27 pm #75293LeahMemberHi 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,
LeahNovember 8, 2013 at 7:32 am #75372BristonParticipantHi 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(); ?>November 8, 2013 at 7:35 am #75374BristonParticipantLets 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(); ?>November 8, 2013 at 7:36 am #75375BristonParticipantOK no posting code here i guess 🙁 sad trombone.
November 8, 2013 at 1:47 pm #75425LeahMemberSorry Briston, the forum doesn’t take pasted code well. Can you use something like pastebin to show us what you used?
Thanks!
LeahNovember 11, 2013 at 10:20 am #75658BristonParticipantOh right….
http://pastebin.com/wKtE9rtYNovember 12, 2013 at 10:20 am #75800LeahMemberThanks 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,
LeahNovember 12, 2013 at 12:51 pm #75863BarryMemberHi 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!
-
AuthorPosts
- The topic ‘Too many events on one day, just show link’ is closed to new replies.