Home › Forums › Calendar Products › Events Calendar PRO › Hiding the iCal import bar on the events page
- This topic has 12 replies, 4 voices, and was last updated 10 years, 10 months ago by
Support Droid.
-
AuthorPosts
-
November 11, 2013 at 3:36 am #75606
lisadavies
ParticipantHi, asked last month about hiding the iCal import bar on the events page and you helped me to resolve it. However, updating the plugin has meant that it’s now re-appearing (not on the current month page) on the previous and next month’s pages? Can you let me know why that is happening and how I can resolve it?
Thanks
November 12, 2013 at 2:13 pm #75887Barry
MemberHi lisadavies: can you confirm if the snippet is still present in your theme’s functions.php file? Best I can tell it should still work as expected, so one possibility is that you also updated your theme and your functions.php file was overwritten (in which case, you could either set this code up as a plugin or make the change from within a child theme – or otherwise follow your theme vendor’s instructions for adding custom code instead).
Does that help at all?
November 13, 2013 at 12:22 am #76170lisadavies
ParticipantHi, thanks for the reply. I confirm that the snippet is still present in my theme’s functions.php file (see below excerpt extracted from the file). I can also confirm that I did not update the theme nor the child theme. I believe I only updated the relevant plugins including the Event calendar and the catergory colours etc. Does this help?
Thanks
<?php //
add_action('tribe_events_before_template', 'remove_ical_from_list_view');function remove_ical_from_list_view() {
if (tribe_is_event_query() && tribe_is_list_view())
remove_filter('tribe_events_after_footer', array('TribeiCal', 'maybe_add_link'), 10, 1);
}add_action('tribe_events_before_template', 'remove_ical_from_month_view');
function remove_ical_from_month_view() {
if (tribe_is_event_query() && tribe_is_month())
remove_filter('tribe_events_after_footer', array('TribeiCal', 'maybe_add_link'), 10, 1);
}November 13, 2013 at 6:41 am #76226Barry
MemberThat does help, I had actually thought you were referring to this code as provided in your previous post, but you are clearly using quite different code, hence the confusion ๐
The code you are using does still work for me, however, so I can’t help but think there is some other issue here. Can you post the complete contents of your theme’s functions.php file so I can see that snippet in context? Can you also do so using a service such as Pastebin or Gist, rather than posting directly in the forum, to avoid code being dropped (our forum software does not currently do a great job in terms of handling code).
Thanks!
November 14, 2013 at 12:42 am #76387lisadavies
ParticipantHi, thanks for the reply. Not used Gist or Pastebin before so was confused with it but think I’ve done it. I’m not sure how I should share the link to show you the code but think this is it: http://pastebin.com/TuP3wJCu. Hope you are able to access. Let me know if otherwise.
Thanks
November 14, 2013 at 8:54 pm #76577Barry
MemberHi lisadavies,
It looks fine to me, I’m not sure why it isn’t working for you: if I test the very same code, literally copying and pasting from your version, it works perfectly. Is it at all possible you are editing the wrong functions.php file?
In any case, I’m afraid we’re not going to be able to help much more with this since it still seems like a basically sound approach when I test it out and is also a customization, for which we can really only provide pointers.
If it helps we can give you a list of freelancers/independent developers who might be able to guide you through this and figure out what might be going wrong in the specific case of your installation?
November 15, 2013 at 12:23 am #76592lisadavies
ParticipantHi, thanks for the reply. I’ve had another look and realise why I thought it worked before and it doesn’t now. When I was testing it the last time, the import bar didn’t appear at all but I think that was because there were no events in the calendar so it seems to appear only when there are events in the calendar. Is that right and is that supposed to work like that?
It’s not a big problem so it’s fine if it can’t be resolved. I just think it’s a bit strange for people to import the calendar in the previous month if they have already happened – do you know what I mean?
Anyway, thanks for all your help with this!
November 15, 2013 at 12:25 am #76593lisadavies
ParticipantCan I just double check with you that we are on the same wavelength? The import bar does not appear on the current month which is what I wanted. However, the import bar appears on the previous and next months which is what I didn’t want but like I said, it’s not a big problem if it can’t be resolved.
Thanks!
November 15, 2013 at 9:38 am #76684Barry
MemberAhh, I see. No we weren’t quite on the same wavelength but you’re right, that is an issue and one I believe we had on our issue tracker. Bear with me while I check in on the progress of that.
November 15, 2013 at 9:48 am #76685Barry
MemberOK, so a number of changes were made and we actually ought to take a different tact here. So, remove that code you currently have and – if you want to remove iCal buttons everywhere – add this instead:
add_filter('tribe_events_list_show_ical_link', '__return_false');If you want to target only month and list view, try this snippet instead of the above one. Does that help?
November 21, 2013 at 12:23 am #77793lisadavies
ParticipantMorning! I couldn’t log in the other day so couldn’t reply. Just wanted to say that your advice above worked. It’s looking fab now, so once again thank you!
November 21, 2013 at 5:25 am #77810Kelly
ParticipantThatโs great news, lisadavies! ๐ Thanks for letting us know!
July 7, 2015 at 6:29 am #982271Support 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 ‘Hiding the iCal import bar on the events page’ is closed to new replies.
