Home › Forums › Calendar Products › Events Calendar PRO › Complex filtering question
- This topic has 10 replies, 4 voices, and was last updated 9 years, 1 month ago by
Tristan.
-
AuthorPosts
-
February 16, 2017 at 12:03 pm #1239005
Tristan
ParticipantHi all,
We have a possible complex question which may not have an answer, however I thought I would attempt to ask and see what you think.
We have our main calendar which displays all events irrelevant of category.
We then have several short code driven calendars to drive either specific venues or event types.
My question is this, is there any way to remove an event category through the use of a functions.php filter from the main calendar which would still show if shortcoded elsewhere?
I hope that make sense to someone, I suspect its not possible but thought I would ask to put my mind at ease.
My deepest thanks
Tristan
February 16, 2017 at 12:27 pm #1239034Tristan
ParticipantHi,
I should have added I tried doing the links by category/event for our main calendar which achieves the month view we are looking for (IE it doesn’t show certain events as we would like), however it has some very strange results with the dates when going between month, list and day view.
It defaults back to a date of October the 8th 2006 which may mean something to someone.
Thank you
Tristan
February 17, 2017 at 10:16 am #1240226Cliff
MemberHi, Tristan.
I appreciate your question and the desire to customize it for your use. However, we cannot always provide such in-depth customization help, per our Scope of Support / Terms.
This does sound possible, but I’m not 100% clear what you’re wanting excluded. Providing links and mentioning specific events I’ll be able to see there might help. If you share an annotated screenshot or video screen capture, it might help, too.
If there’s a code snippet you’d like me to put some eyes on, please update this ticket.
Thank you very much for your understanding.
If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.
February 25, 2017 at 2:43 am #1245728Tristan
ParticipantHi Cliff,
I completely understand and possibly I can solve through our own development if you can answer this question.
Where does the event calendar pull this date from “October the 8th 2006” as its default date as if we can manipulate this we can use the extended url system we believe IE instead of
https://thewhiteisle.co.uk/ibiza-clubbing-calendar/
we can use
https://thewhiteisle.co.uk/ibiza-clubbing-calendar/category/event/
which in some views defaults to the date of 8/10/2006.
As an example if you go from this url
https://thewhiteisle.co.uk/ibiza-clubbing-calendar/category/event/list/
and click month view from the bar it goes to this url https://thewhiteisle.co.uk/ibiza-clubbing-calendar/month/?tribe-bar-date=6-10-08
I hope that makes a little more sense.
Tristan
February 25, 2017 at 7:48 am #1245789Cliff
Memberhttps://thewhiteisle.co.uk/ibiza-clubbing-calendar/month/?tribe-bar-date=6-10-08 was the only one that was in October 2006 for me.
The others were all April 2017, which either is a bug (doesn’t display February) or a feature (displays the first month with an event); I’m not sure.
However, the fact that this is a good thing (don’t want to display empty views) and that they all acted consistently leads me to believe it’s a built-in feature that I forgot about or is one of your customizations.
Other than the URL with “tribe-bar-date” in it, none display in 2006 for me.
You initially stated, “My question is this, is there any way to remove an event category through the use of a functions.php filter from the main calendar which would still show if shortcoded elsewhere?”
Is that still your question?
February 25, 2017 at 9:02 am #1245876Tristan
ParticipantHi Cliff,
We have a function to only display April 2017 onwards
function tribe_force_event_date( WP_Query $query ) {
// Don’t touch single posts or queries other than the main query
if ( ! $query->is_main_query() || is_single() ) {
return;
}// If a date has already been set by some other means, bail out
if ( strlen( $query->get( ‘eventDate’ ) ) || ! empty( $_REQUEST[‘tribe-bar-date’] ) ) {
return;
}// Change this to whatever date you prefer
$default_date = ‘2017-04-01’;// Use the preferred default date
$query->set( ‘eventDate’, $default_date );
$query->set( ‘start_date’, $default_date );
$_REQUEST[‘tribe-bar-date’] = $default_date;
}add_action( ‘tribe_events_pre_get_posts’, ‘tribe_force_event_date’ );
This will be removed once we get to April which may or may not solve the problem.
Ultimately we would like two calendars but am aware this is not possible so am using one via the shortcode system and the other i was going to use this url
https://thewhiteisle.co.uk/ibiza-clubbing-calendar/category/event/
However I get the 2006 date issue which if can be solved would work for us.
My original question was asking could an event category (in this case boat-party) be excluded from showing in the main calendar but shown in the short code versions however the more I am understanding how the calendar works I guess this is not an option.
I hope that makes sense.
And thank you for looking at this problem for us.
Tristan
February 27, 2017 at 11:55 am #1246412Cliff
MemberHere’s our bit about multiple calendars…
Our plugin creates one master calendar, but you can create the appearance of multiple calendars by using Event Categories.
Examples:
- main/master calendar where all the site’s events appear: http://wpshindig.com/events/
- WP Meetups category calendar: http://wpshindig.com/events/category/wp-meetups/
- Learning category calendar: http://wpshindig.com/events/category/learning/
There are additional methods and documentation at our Can You Have Multiple Calendars? KB article.
Beyond this, I’m afraid we’re in custom development territory, for which we’re limited in helping further.
Please let me know if this clarifies things for you.
February 27, 2017 at 12:23 pm #1246435Tristan
ParticipantHi Cliff,
My deepest thanks, this is the route I have taken I am still baffled by the default date issue but will relook at this once we remove the force date function in early April.
I should also add we have done a lot of bespoke changes along the way ourselves as we are attempting to push the limits of the calendar far beyond what it was ever designed for, is an interesting journey.
Again my deepest thanks for your insight and help
Tristan
February 27, 2017 at 2:17 pm #1246484Cliff
MemberI’m glad to help where I can, Tristan. Thanks for your understanding.
I’ll leave this thread Open for right now.
Please note that threads get Closed automatically after a couple weeks of inactivity. If it does get Closed, please open a new thread, adding your current problem description and also linking back to this thread.
Thank you!
March 21, 2017 at 9:35 am #1257387Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Complex filtering question’ is closed to new replies.
