Forum Replies Created
-
AuthorPosts
-
Emily Pryor
ParticipantEmily Pryor
ParticipantThe cache wasn’t on, and nothing else that would affect anything in the functions.php file.
I changed the function to be only:
$classes[] = ‘testCHAD’;
return $classes;Which should put that class in every entry regardless (at least from how I’m reading things) and it’s not doing that. It seems like the function is running (since the errors triggered), but not actually hooking in to the calendar.
Thanks!
Chad
Emily Pryor
ParticipantThanks much, that should work perfectly, but this line has a PHP error:
$cur_day = tribe_events_get_current_month_day()[ ‘date’ ];
From your docs, looks like that returns an array, but that’s not the right syntax, at least it’s throwing an error on the []. So I tried this to pull the array then get the value:
$cur_day_array = tribe_events_get_current_month_day();
$cur_day = $cur_day_array[‘date’];And while that doesn’t throw an error, it’s not inserting the classes. I’m assuming this would be added to the DIV tag which surrounds the H3 and A, and I don’t see anything in there. Looking at the code, it all looks logical and correct to me, so not sure why it’s not working.
Thanks for your continued assistance!!
Chad
Emily Pryor
ParticipantThis would be in the calendar view for events across multiple days, URLs below.
So yes, one class around the first instance (there’s a DIV/H3/A structure, it looks like it’d be in the outside DIV) and then a different class around all other instances would be perfect.
What I was trying to do was simulate that with jQuery each loops around the same HREFd A tags, and that works fine when there’s just one event a day, but doesn’t work when there’s multiple on a day the way it’s looping. See them nicely here in August, but not in September. (Which you might have to reload to get the jQuery to kick in.)
http://data2x.org/events/2016-09/
If you want to move this thread to just email, I’m actually Chad, the developer for Data2X and am at [email protected]. But it’d fine to keep things here as well if it needs to be.
Thanks!!
-
AuthorPosts
