-
AuthorSearch Results
-
July 24, 2015 at 3:11 pm #990155
In reply to: Tribe Bar Day View Displaying Multiple Times
Nico
MemberHey Matt,
Thanks for the follow-up! This one was a tricky one to get sorted I must say.
The thing is that ‘tribe-events-ajax-day’ script sets ‘tribe-events-bar’ as dependency, so that why it got in there anyway! I included the dependency clean up in this modified version of your script. PLease try it out and let me know if it works.
add_action( 'wp_enqueue_scripts', 'mw_enqueue_fonts' );
function mw_enqueue_fonts() {
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,100italic,300italic,400italic,700italic|Roboto:400,700,500italic,500,400italic,300italic,300,100italic,100', array(), CHILD_THEME_VERSION );
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', array(), CHILD_THEME_VERSION );
if ( tribe_is_day() ) {
global $wp_scripts;
$wp_scripts->registered['tribe-events-ajax-day']->deps = array();
}
wp_dequeue_script( 'tribe-events-bar' );
if ( tribe_is_month() || tribe_is_map() || tribe_is_photo() || tribe_is_day() || tribe_is_week() || tribe_is_list_view() ) {
wp_enqueue_script( 'pondhole-tribe-events-bar', get_stylesheet_directory_uri() . '/js/tribe-events-bar.min.js', array( 'jquery' ) );
}
}
Have a great weekend,
Best,
NicoJuly 23, 2015 at 5:35 pm #989745In reply to: Tribe Bar Day View Displaying Multiple Times
Ryan
ParticipantGood catch on it not dequeueing properly in the ‘day view’. Just as a test I renamed the tribe-events-bar.js and tribe-events-bar.min.js in the plugin so it couldn’t load that file and it then works properly (even though there is a console error since there is a file missing). So, for whatever reason the dequeue is not working properly in day view.
Interesting behavior. Any help would be great!
Note – I’ve put the file names back to normal so it is currently in the ‘non-working’ state.
Thanks,
Matt
-
This reply was modified 10 years, 9 months ago by
Ryan. Reason: Make sure you are aware that I've renamed the files back to normal
July 23, 2015 at 10:58 am #989531In reply to: Tribe Bar Day View Displaying Multiple Times
Ryan
ParticipantHey Nico,
Thanks for the help. Here is the function I’m using to dequeue the script and the enqueue the modified version. Obviously you can ignore the reference to google fonts and font icons.
add_action( 'wp_enqueue_scripts', 'mw_enqueue_fonts' ); function mw_enqueue_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,100italic,300italic,400italic,700italic|Roboto:400,700,500italic,500,400italic,300italic,300,100italic,100', array(), CHILD_THEME_VERSION ); wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', array(), CHILD_THEME_VERSION ); wp_dequeue_script( 'tribe-events-bar' ); if ( tribe_is_month() || tribe_is_map() || tribe_is_photo() || tribe_is_day() || tribe_is_week() || tribe_is_list_view() ) { wp_enqueue_script( 'pondhole-tribe-events-bar', get_stylesheet_directory_uri() . '/js/tribe-events-bar.min.js', array( 'jquery' ) ); } }Thanks!
Matt
July 23, 2015 at 10:37 am #989515In reply to: Tribe Bar Day View Displaying Multiple Times
Nico
MemberHi Matt,
Thanks for reaching out to us! I’ll try to help you out fixing this -rather strange- issue!
From what I’m seeing in the source code ‘tribe-events-bar.min.js’ is getting included twice -both the ‘original’ script and your modified copy- in day view. So I’m guessing the script dequeue is not working properly there.
Can you paste the actual code you are using to dequeue the script?
Best,
NicoJuly 22, 2015 at 2:17 pm #989107In reply to: Google Maps & iCal/Google Calendar Buttons
Brook
ParticipantHowdy again Richard,
I took a look at your site andinvestigated the error. It does not appear to be a CSS issue, and no JS error is thrown. The likely cause of this error is the Google Maps in your footer. Sometimes other plugins load a different version of Google maps that overrides the usual one, and this can cause problems.
Trying to integrate the theme might be a bit problematic and require some PHP knowhow, but I will do my best to break it down. First, you might try disabling the footer Map in your theme. If there is a setting, try that. If not, try dequeueing the scripts and hiding the element from displaying. Does our Gmap now display? If so, try unhiding the element. Do they both display? If not, you will likely need to try our a different way to show your gmap in the footer. Perhaps a different plugin, or writing your map using the API loaded with Tribe’s plugin which you could enquque on every page.
Does that all make sense? Will that work for you? Please let me know.
Cheers!
– Brook
July 15, 2015 at 7:01 am #986561In reply to: Scroll To Div on Filter 'View As' Change
Brook
ParticipantYou are very welcome Matt!
The handle is actually the exact same. You can still dequeue it with tribe-events-bar. All you have to do is disable script_debug, and then tribe-events-bar becomes the minified version. So you can keep this line and you should be up and running:
wp_dequeue_script( 'tribe-events-bar' );Did that work?
– Brook
July 14, 2015 at 5:46 am #986189In reply to: Scroll To Div on Filter 'View As' Change
Ryan
ParticipantHey Brook,
What is the handle to dequeue the minified version of the tribe-events-bar. I can’t seem to find any reference on how to target the minified version.
I disabled the function to dequeue the ‘tribe-events-bar’, removed the script_debug and ran another script to show all the handles of the js files and it shows ‘tribe-events-bar’ but no reference to a handle for the minified version so how can I go about targeting the minified one?
Just about there! Thanks for the continued support.
Matt
July 13, 2015 at 11:11 pm #986156In reply to: Scroll To Div on Filter 'View As' Change
Brook
ParticipantI’m guessing that leaving the script_debug constant in place is not ideal. How can I go about dequeue-ing the minified version of the tribe-bar script and enqueuing one that I minify?
That’s a good point Matt. You can disable it, then dequeue …/js/tribe-events-bar.min.js instead.
Your method of dequeueing works great. I would stick with that so that you can disable script_debug and not have to worry about anything.
Does that answer all of your questions? I am really happy you were able to get it working.
Cheers!
– Brook
July 12, 2015 at 5:28 am #985673In reply to: 500 error – single event page
Geoff
MemberHey Toby and thanks for getting in touch!
I just checked the site and was able to access both the calendar (/exhibitions) and a single event without a a 500 error, including using the link you provided. Were you perhaps able to resolve the issue on your own? Or maybe I’m missing something and you can help point me in the right direction.
I did, however, notice the following console error when viewing the site:
You have included the Google Maps API multiple times on this page. This may cause unexpected errors. (main.js:60)
I have seen other types of errors pop up as a results of this (e.g. the map not displaying on the site event post), so you’ll want to be sure to check where that extra instance of the Google Maps API is coming from–such as your theme or another plugin–and dequeue the script that is making that call.
Cheers!
GeoffJuly 11, 2015 at 10:06 am #985630In reply to: Scroll To Div on Filter 'View As' Change
Ryan
ParticipantHey Brook,
I was enable to get this working by dequeue-ing the ‘tribe-events-bar’ script and enqueue-ing my modified one and putting the script_debug constant in place per your suggestion. Here is the code:
add_action( 'wp_enqueue_scripts', 'mw_enqueue_fonts' ); function mw_enqueue_fonts() { wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lato:100,300,400,700,100italic,300italic,400italic,700italic|Roboto:400,700,500italic,500,400italic,300italic,300,100italic,100', array(), CHILD_THEME_VERSION ); wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', array(), CHILD_THEME_VERSION ); wp_dequeue_script( 'tribe-events-bar' ); wp_enqueue_script( 'pondhole-tribe-events-bar', get_stylesheet_directory_uri() . '/js/tribe-events-bar.js', array( 'jquery' ) ); } define( 'SCRIPT_DEBUG', true );I’m guessing that leaving the script_debug constant in place is not ideal. How can I go about dequeue-ing the minified version of the tribe-bar script and enqueuing one that I minify?
I’m just about there!
Thanks,
Matt
June 30, 2015 at 3:19 pm #974007In reply to: Theme Conflict: Risen Theme
Geoff
MemberThanks for confirming that, Shelley!
You could certainly try removing the calendar’s API scrips using this function in your theme’s functions.php file:
[php]
function dequeue_tribe_events_scripts() {
wp_dequeue_script( ‘tribe-events-pro-geoloc’ );
}
add_action(‘wp_enqueue_scripts’, ‘dequeue_tribe_events_scripts’, 100 );
[/php]Let me know if that does the trick. If not, we may need to see if the theme developer can help shed some light here. 🙂
Cheers!
GeoffJune 30, 2015 at 8:42 am #973898In reply to: Theme Conflict: Risen Theme
Geoff
MemberHi Shelley, thanks for getting in touch!
First off, I really appreciate you letting us know about this. While we can’t always make the plugins compatible with all themes, it helps a ton to know where there are conflicts — this allows us to see if there’s anything we can or should be doing on our end to make the calendar more extensible in future release. So, again, thanks!
The thing I notice right off the bat is this error message in the console:
You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
Does the Risen theme include the Google Maps API on all pages throughout the site? If so, and you plan on using the Google Maps feature in the calendar, then I would suggest dequeuing the instance the theme is injecting to see if that clears things up. The theme developer might even have a handy snippet to help so it only dequeues its instance from calendar pages.
Let’s start there and see what we find. 🙂
Cheers!
GeoffJune 26, 2015 at 6:52 am #973142In reply to: How do I deregister widget-calendar-full.css?
Nico
MemberGarreth,
Thanks for your patience on this. Here’s the updated code for the ‘Event List’ widget:
add_action( 'wp_print_styles', function(){ wp_dequeue_style( 'widget-calendar-pro-style' ); } );
Please let me know if this works for you,
Have a great Friday,
NicoJune 24, 2015 at 8:39 am #972627In reply to: dequeue styles filter bar 3.10
Brian
MemberHi,
Thanks for using our plugins.
Looks like a change to the registered name in WordPress is causing this.
Try out this coding instead, it worked for me:
add_action( 'wp_enqueue_scripts', 'remove_filter_bar_styles', 100 );
function remove_filter_bar_styles() {
wp_dequeue_style( 'Tribe__Events__Filterbar__View-css' );
}Let me know if that works for you.
Thanks
June 18, 2015 at 5:22 pm #971182In reply to: How do I deregister widget-calendar-full.css?
Nico
MemberHi Garreth,
Thanks for hitting the forums!
This snippet should do the trick:
add_action( 'tribe_pre_get_template_part_pro/widgets/mini-calendar-widget', function() {
wp_dequeue_style( 'widget-calendar-pro-style' );
} );
Let me know if that works for you,
Best,
Nico -
This reply was modified 10 years, 9 months ago by
-
AuthorSearch Results
