Home › Forums › Calendar Products › Events Calendar PRO › Pass Page Title to ECP mini calendar widget as filter
- This topic has 7 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
November 13, 2013 at 10:45 am #76287
snorton
ParticipantI’m interested in finding out if it’s possible to pass the page title through to the Events Calendar widget (minicalendar) as a means of filtering the results. Basically, there are certain pages where I’d like to display only events whose category slug matches the slug of the page.
I know that what I want can be done by simply registering a unique sidebar for each specific page and manually changing the default widget settings, but I was curious to know if I can take a more dynamic approach to this where I can modify the tax_query $args to include the current page slug as a means of filtering.November 14, 2013 at 6:29 pm #76558Julie Kuehl
ParticipantHey snorton,
I apologize for the failure to get a proper response to you in a timely manner. I just wanted to let you know that we’ve not forgotten about you and will be with you shortly.
— Julie
November 14, 2013 at 9:02 pm #76579Barry
MemberHi Snorton,
If I’m understanding you correctly then yes, I would think that is very much a possibility. That said, it is also a customization of the sort we can’t really help you with, beyond referring you to our Themer’s Guide and technical docs – as much as anything this sort of task really comes down to general WP development skills as you would probably approach this by altering the query with filters just as you might if you needed to alter WordPress’s own main query.
We do wish you luck, though, it’s great to hear of interesting things like this being built on top of The Events Calendar 🙂
Good luck!
November 14, 2013 at 9:52 pm #76588snorton
ParticipantI understand, and I frequent your tech docs for reference (very comprehensive) from time to time. I also understand you guys stay very busy with the many posts for support: you may see that I’ve provided several replies marked as answers for others when I’m awaiting a response. So I presume I should write a filter in my themes functions.php; maybe I can just get a nod of affirmation that I’m working in the right direction?
function replace_mini_calendar_args() {
$newargs = array([wp_query ]);
return $newargs;
}
add_filter(‘tribe_events_get_mini_calendar_args’,’replace_mini_calendar_args’);November 15, 2013 at 9:37 am #76682Barry
MemberYes that certainly sounds like a good starting point, with perhaps tax_query being a good target (out of the various keys in the $args array).
We do also absolutely appreciate that you take the time to help out here on the forum – it’s great to see – and we wish we could also offer deeper support at times like this; at the same time we are unfortunately limited by the practical realities of responding to large volumes of support requests with limited resources. That’s not too make excuses, but just to explain our position.
Thanks again – and good luck with this customization 🙂
November 15, 2013 at 10:25 am #76692snorton
ParticipantI know what you’re saying – I apologize if what I said sounded pretentious even in the slightest. I will take your suggestion and continue this route as I’m fairly certain that I can take it from here.
Thanks again, Barry.
November 18, 2013 at 12:23 pm #76993Barry
MemberNo problem at all 🙂
July 7, 2015 at 6:29 am #982038Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Pass Page Title to ECP mini calendar widget as filter’ is closed to new replies.
