Use Jetpack "Visibility" to show widget on main events page

Home Forums Calendar Products Events Calendar PRO Use Jetpack "Visibility" to show widget on main events page

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #887096

    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.

    #888411
    George
    Participant

    Hey @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

    #889107

    Sure, 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.

    #889476
    George
    Participant

    Thanks 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 called widget-conditions.php, and in this file, you’ll find a method called filter_widget() – for me, it’s around line 347 of the widget-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,
    George

    #898409

    Thanks 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.

    #904133
    George
    Participant

    Hello,

    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,
    George

    #949960
    George
    Participant

    Hello,

    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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Use Jetpack "Visibility" to show widget on main events page’ is closed to new replies.