Home › Forums › Calendar Products › Events Calendar PRO › Use Jetpack "Visibility" to show widget on main events page
- This topic has 6 replies, 2 voices, and was last updated 9 years, 1 month ago by George.
-
AuthorPosts
-
November 16, 2014 at 12:20 pm #887096Christopher Liu-BeersParticipant
I’m having trouble getting a widget to appear on my main events calendar page. I have selected to show this widget when:
1) the Taxonomy is “all_tribe_events”,
2) Page is “Calendar” (my main events page, setup correctly in TEC Settings)
3) Page is Post Type = “Event”So the widget I need does appear correctly on single events, but not the main calendar. Any guidance here? Thanks.
November 17, 2014 at 3:58 pm #888411GeorgeParticipantHey @wilbrimley,
Thanks for the question, and apologies for your inconvenience so far. I’m checking this out for you and am hoping we can get you pointed in the right direction here.
One of my main concerns is the second rule you posted here – it may not be working correctly, or at least not like you’d expect. You mention your main events page being “Calendar”, and that this was set up correctly in your Event Calendar settings – can you specify how you set this up, exactly?
I downloaded and set up Jetpack’s Widget Visibility module myself to test out this issue, and I too am having trouble getting widgets to display alongside the main calendar view. The main Events view may require a level of specificity that the Widget Visibility module currently doesn’t support.
Let me know about your Calendar page configuration, we can take things from there. Thanks!
George
November 18, 2014 at 7:30 am #889107Christopher Liu-BeersParticipantSure, the “Events URL slug” is “calendar”, so my main events listing is here: http://www.chathamartscouncil.org/calendar/
I am ok with trying to make this happen thru functions.php. Thanks for your help.
November 18, 2014 at 11:14 am #889476GeorgeParticipantThanks for the sharing that link, looks like a cool site for a cool project.
I looked into how this could be possible from the technical side of things, and unfortunately, editing your
functions.php
is indeed at least what would be required to add this functionality (as far as I can tell).We can only offer limited help with customizations, especially when related to third-party plugins and such, but I’m happy to offer enough general help to get you get started:
For starters, I took a look at the Widget Visibility module itself within Jetpack, and suggest you do the same. You can find this in the
modules
folder within your Jetpack plugin files.Within the
widget-conditions
module folder, you’ll find a file calledwidget-conditions.php
, and in this file, you’ll find a method calledfilter_widget()
– for me, it’s around line 347 of thewidget-conditions.php
file.Basically, the best thing I can think of personally would be to copy this function and modify it to your needs. Your theme’s
functions.php
file is a good place to play with this – a custom plugin is even better.If you’re comfortable with all this, you could then use the various Events Calendar-specific conditional rules to have complete control over your Events template sidebars and widgets – there’s a really handful collection of the available Events conditionals here → https://gist.github.com/jo-snips/2415009
I hope that helps, please let us know if it does – or if you have any follow-up questions to this post here.
Cheers,
GeorgeNovember 25, 2014 at 11:32 am #898409Christopher Liu-BeersParticipantThanks for this – I can see where this is going but I’m still new to PHP. Any chance you could post an example of how this might work? Much appreciated.
December 1, 2014 at 10:38 am #904133GeorgeParticipantHello,
Unfortunately, there isn’t much more depth I can go into here on the code side of things – we only offer limited support for customizations, especially when they’re mainly related to third-party plugins that are not our own.
But do not be discouraged – the steps I described in my replies above should get you pretty far along, and fortunately, many of the aspects of this sort of customization are easy to find tutorials and reference material for around the web. If you take a look at the filter_widget() function I mentioned and implement it on your site, simply copying it and playing around with modifying it should be a great place to start.
If you truly feel out of your element with this and don’t want to make customizations, the best thing I could recommend would be to hire a web developer or post a task for this on a website like Envato Studio.
Thanks for understanding the limitations of our support here, please let me know if you have other questions on this issue. If not, I’ll close up this ticket and mark it resolved (though you can open another ticket for other issues any time! :)).
Cheers,
GeorgeMarch 21, 2015 at 12:47 pm #949960GeorgeParticipantHello,
This issue’s been sitting here a while so I’m going to go ahead and close it for now – if other issues arise, don’t hesitate to come back and open a new ticket, and if you need to open a new ticket about the same issues you originally brought up here, please share a link to this original ticket so we can pick up where we left off.
Cheers!
George -
AuthorPosts
- The topic ‘Use Jetpack "Visibility" to show widget on main events page’ is closed to new replies.