Forum Replies Created
-
AuthorPosts
-
Peter Hoppe
ParticipantThe theme developer ended up fixing the issue with a patch for the theme. Contact your theme author (looks like you’re using Avada through Themeforest).
Peter Hoppe
ParticipantThanks George. Any luck yet?
Peter Hoppe
ParticipantYes, sir. I really appreciate you guys helping get this fixed. Thanks again.
Peter Hoppe
ParticipantThis reply is private.
Peter Hoppe
ParticipantThis reply is private.
Peter Hoppe
ParticipantHey George, the plugin developer said he did test the code in chunks and that the code pasted above is the snippet causing problems. Without that bit of code, the map view works fine. But with it, it does not. He said this snippet shouldn’t affect the plugin, but somehow it is. Any ideas?
I forgot to mention it before, but yes, I’ve tested the code selectively, and the code I’ve pasted before is causing the problem in the plugin. Without this part all works fine. – Plugin developer
Peter Hoppe
ParticipantThanks George. I sent this thread to the theme author and he came back with this:
Indeed, the theme extends Array prototype with the following code, as stated in the last post of the topic you’ve shown
Array.prototype.unique = function() { return this.filter(function(value, index, array) { return array.indexOf(value, index + 1) < 0; }); };but it should not affect plugin’s script. I was suspecting some conflict, so I’ve changed name of the function, but it’s the same. I don’t know what happens in the plugin, which causes the mess. I’m sorry we send you back and forward, but please consult what I wrote with the plugin support.
Peter Hoppe
ParticipantOk, I added that line of code to my wp-config.php file.
Peter Hoppe
ParticipantThis reply is private.
-
This reply was modified 11 years, 1 month ago by
George.
Peter Hoppe
ParticipantYeah, I prefer not to keep adding plugins when a little code to functions.php will do the trick. Here’s what I added for now – it’s not perfect but hides the tab for now. Is there a way I can improve this? While this code hides the tab, there is still a small gap between the Dashboard and Profile tabs.
function scents_remove_events() {
if ( !current_user_can( ‘manage_options’ ) ) {
remove_menu_page( ‘edit.php?post_type=tribe_events’ );
}
}
add_action( ‘admin_init’, ‘scents_remove_events’ );Peter Hoppe
ParticipantFYI: I have found the tutorial for hiding the Events tab from the Admin Top Bar, but nothing for removing it from the sidebar (next to Profile and Dashboard).
Peter
-
This reply was modified 11 years, 1 month ago by
-
AuthorPosts
