Search Results for 'dequeue'

Home Forums Search Search Results for 'dequeue'

Viewing 15 results - 151 through 165 (of 274 total)
  • Author
    Search Results
  • #1044478
    Diane
    Participant

    i tried this and it doesn’t work…

    function dequeue_tribe_events_scripts_and_styles() {
    if ( function_exists( ‘tribe_is_event’ ) ) {
    //dequeue scripts and styles
    if ( ! is_home() && ! tribe_is_event() ) {

    wp_dequeue_style( ‘tribe-events-full-pro-calendar’ );
    wp_dequeue_style( ‘tribe-events-calendar-pro’ );
    wp_dequeue_style( ‘tribe-events-calendar-full-pro-mobile’ );
    wp_dequeue_style( ‘tribe-events-calendar-pro-mobile’ );
    wp_dequeue_style( ‘tribe_events-widget-calendar-pro’);

    wp_dequeue_script( ‘tribe-events-list’ );
    wp_dequeue_script( ‘tribe-events-pro’ ); // relies on tribe-events-calendar-script
    wp_dequeue_script( ‘tribe-events-pro-geoloc’ );
    wp_dequeue_script( ‘tribe-placeholder’ );
    wp_dequeue_script( ‘tribe-events-jquery-resize’ );
    wp_dequeue_script( ‘tribe-events-bar’ ); // relies on placeholder, resize, datepicker
    wp_dequeue_script( ‘tribe-events-calendar-script’ ); // relies on placeholder, resize, datepicker
    wp_dequeue_script( ‘tribe-events-bootstrap-datepicker’ );

    }
    }
    }

    #1043913
    Cliff
    Participant

    Thanks! The AJAX call itself appears to be working (I can see results when I inspect the network calls), but has trouble putting the result in. Again, I think this is just a conflict buried too deep in this set of themes and plugins.

    It looks like the handle for the main script I was looking to remove changed to the-events-calendar, so I had to use wp_dequeue_script( 'the-events-calendar' ); instead.

    That said, taking out that script also completely disables the ability to select a day or event on mobile. 🙁 Any ideas on keeping that functionality while allowing the navigation buttons to not operate by AJAX?

    • This reply was modified 10 years, 4 months ago by Cliff.
    Josh
    Participant

    Hey Mike,

    Thanks for reaching out to us!

    The updated styling is something that we have done intentionally here, however I can definitely understand not liking the different scheme there.

    You should be able to remove it by dequeueing the datepicker style. Something like:

    
    add_action( 'admin_enqueue_scripts', 'dequeue_datepicker_style', 100 );
    function dequeue_datepicker_style() {
    wp_deregister_style('jquery-ui-datepicker');
    }
    

    should work to get you back to the old style.

    Let me know if this helps.

    Thanks!

    Josh
    Participant

    Hey,

    Thanks for providing that additional information! Looking at the site, I’m a bit suspicious of this jquery-ui.js file within your theme https://cloudup.com/cI3au6yT0pn. Can you try dequeueing that file and seeing if the issue persists with that file out of the mix here?

    Thanks!

    #1022527

    In reply to: Week View not working

    Dave
    Participant

    Thanks for the advice and encouragement! I’m actually fairly new to this and so any advice I can get is very valuable. As I was comparing the working site (with default theme) with the non-working site (with Retailer theme) I think I narrowed it down to the sticky header somehow conflicting with the scrolling functionality on the Week View. So I tinkered around in what I felt was a fairly “hacky” (that’s probably not a real word) way, mostly in CSS but also by putting an altered week template into my child theme folder. It took a while but it’s working now and it does what the customer was wanting it to do, so I’m happy about that.

    I’ll definitely do some research on wp_dequeue_script() and try using it as you suggested – it looks like a useful tool that I didn’t know about!

    #1022420

    In reply to: Week View not working

    Brook
    Participant

    You are welcome Dave!

    I am happy you gave that a whirl again. We would have ran down a lengthy road searching elsewhere. I debug all day long, but I also have to run the same test twice sometimes and will get a different result. :-/

    Debugging a theme you didn’t write is unfortunately hard. Mostly because you have to rely heavily on your intuition/intimate knowledge of the APIs it uses and how it uses them. Bur if I were you, here is how I would start:

    1. Dequeue the ‘tribe_events_google_maps_api’ script via wp_dequeue_script(). This should remove the duplicate API errorand maybe the sensor error.
    2. Try dequeuing the scripts in your theme until all of the errors are gone. Then reenable them one at a time until you can isolate the remaining error. Then we might have a better idea of whats going on.

    It seems like you have already found some way to get the events back though, as I am seeing them on your site right now in the current theme. That’s awesome! How’d you do it?

    • Brook
    #1014485
    Geoff
    Member

    Ah, shoot–sorry for the wrong screenshot. I pasted the wrong link in there, so sorry for the confusion!

    We can also try dequeuing the plugin’s version of the script altogether. You can add a snippet like this to your theme’s functions.php file to do that:

    function dequeue_tribe_events_scripts() {
    wp_dequeue_script( 'tribe-events-pro-geoloc' );
    }
    add_action('wp_enqueue_scripts', 'dequeue_tribe_events_scripts', 100 );

    That deactivates the Google Maps scripts included in both The Events Calendar and The Events Calendar PRO.

    For reference, here is a nice list of all the calendar scripts and their corresponding handles.

    Does that help clear out the console error? Please let me know.

    Thanks,
    Geoff

    #1014277
    diane
    Participant

    Hi Geoff,

    Your screenshot was of the Events Template, which is not related to my issue.

    “Events > Settings > Map Setting > Enable Google Maps” is unchecked. This did not dequeue the Google Map API. It is still running twice on the page. Please refer to http://www.815life.com/events/ to verify.

    Thanks,

    #1013698
    Geoff
    Member

    Hi Diane,

    Just chiming in here while Cliff is taking some much-deserved time off. 🙂

    Sorry if this has already been covered as I try to fill in here, but are your Google Map settings for The Events Calendar already deactivated? You can do this under Events > Settings–scroll down to the Map Settings section, uncheck the option (screenshot) and save your settings.

    That is supposed to dequeue the Google Map API scripts included in The Events Calendar–but do please let us know if that’s not the case for you here.

    Thanks!
    Geoff

    #1012386
    Geoff
    Member

    Hey Emiliano! Thanks for following up and thanks a TON for running through those steps for me–that helps a lot. 🙂

    It’s possible that your theme is using a different version of jQuery than what comes packaged with WordPress by default. I would suggest getting in touch with the theme author to see if that is the case and, if so, how to dequeue that version on the calendar pages. Not trying to push the issue off to someone else–I truly think that will be the easiest way to fix the problem since the theme author knows the code for the theme better than us.

    Let me know if any questions pop up in that process that I can help answer!

    Geoff

    #1010551
    George
    Participant

    Hey Vera,

    If your testing showed that simply activating a default theme resolved your problem, then your custom MentalPress theme is the culprit here. I’m sorry about the bad news that this is, but we do not offer support for software that is not our own and so cannot troubleshoot the theme much.

    I did take a look at your site and see one JavaScript error, which is this one:


    You have included the Google Maps API multiple times on this page. This may cause unexpected errors.

    I’ve seen that error on other sites where it didn’t create bugs like the one you reported, but it could be the problem here. With this information, you can go to your theme support and tell them about the problem. They may have a simple recommendation for dequeueing their own loaded version of the Google Maps API.

    If all of this information is still not helpful, and you would like a refund, then if you purchased your Events Calendar Pro license within the last 30 days we can absolutely give you a full refund.

    To do that, just email [email protected] with a copy to your original order receipt – not a PayPal receipt, it’s an order receipt from this website itself with the Order Number at the top of the email and such.

    Let me know what you think about all of this – I’m sorry if the way I originally addressed your problem didn’t seem like I cared or something; I genuinely hope the best for your site but just wanted to be clear that we cannot offer support for themes or other software that isn’t ours 🙁 I hope you can troubleshoot a bit based on what I reported here in this reply, but if not, I totally understand and can issue a refund promptly.

    Thank you,
    George

    #1008852
    B.
    Participant

    Hi Cliff,
    Thanks for the very helpful reply. I looked at our settings, and yes we are using Skeleton styles (we have to choose 1, figured this would be lightest). But we definitely do not, and never have, used the Mini Calendar widget. We only use the Event List widget.

    So I tried your ‘dequeue method’ to remove all of the styles instead of our filter. In ‘Core > Skeleton Styles’ I let it remove the main calendar-style. Then in ‘Pro > Skeleton Styles’, I had it remove the main calendar style as well as the 2 widget-calendar styles. Everything else is commented out.

    This seems to get rid of all Tribe Event styles EXCEPT:
    – the Datepicker (too long to port over to our master)
    – and the JQuery Smoothness styles (what exactly does this one do???)

    Then we enqueued our main combined & modified stylesheet to replace them.

    Everything appears to look fine at first glance, and we finally got rid of those calendar widget stylesheets. I also hadn’t noticed that before it appeared to have been loading our main modified stylesheet twice, but this is now corrected as well.

    Hoping this is a solid solution. I guess if you guys change classes/ids or other attributes, our stylesheet may break. Hopefully you won’t do this often!!!

    I’ll post a link in a private reply to a test site that we had created in case you want to check it to make sure nothing obvious seems broken.

    Thanks again!

    #1008785
    Cliff
    Member

    Thanks for sharing the code snippet you’re using.

    FYI Stuff:

    The ‘tribe_events_stylesheet_url’ filter is located in /wp-content/plugins/the-events-calendar/src/Tribe/Asset/Events_Css.php and the ‘tribe_events_pro_stylesheet_url’ filter is located in /wp-content/plugins/events-pro/src/Tribe/Asset/Events_Pro_Css.php

    Both of these filters are mentioned in our Themer’s Guide.

    For Your Request:

    This bit of code: 'widget-calendar-' . $stylesheet_option . '.css' is found in /wp-content/plugins/events-pro/src/Tribe/Mini_Calendar.php — so you must have “Skeleton Styles” selected in your Display settings.

    And just a few lines under that code, there’s another filter: ‘tribe_events_pro_widget_calendar_stylesheet_url’ — so you might be able to leverage that to accomplish what you want.

    I think I figured out that, in order for widget-calendar-skeleton.css to load, you have to select “Skeleton Styles” and also be using the Mini Calendar widget.

    Screenshot 2015-09-25 14.10.31

    Bonus Info:

    Here’s a code snippet that may come in handy for your optimizations (will need to be modified for your usage but may be useful instead of or in addition to filters): https://gist.github.com/cliffordp/d3e17609114d84eb6a36 (note lines 43-44 for your situation)

    You might want to go the wp_dequeue_script route instead of the filter mentioned above. It’s your choice.

    Let me know how it goes!

    #999596
    Nico
    Member

    Hi Simon,

    Thanks for reaching out to us, and sorry to hear about this issue. Hopefully I can help you with it 🙂

    Browsing the calendar page on your site I notice there are a couple of JavaScript errors in the console. If this works with Tweentyfifteen theme, I guess there’s a JavaScript conflict with your own theme.

    To debug this, please comment out any JavaScript related code -importing external files in the template, queueing/dequeueing files in your functions.php file, custom code in the header/footer, etc- and test this again.

    Please let me know about how this goes,
    Best,
    Nico

    #996055
    Geoff
    Member

    Nice work! OK, so it does indeed look like the theme itself is making an additional call to the Google Maps API than the one that is already called by The Events Calendar.

    You can dequeue either script. If you choose to dequeue the plugin’s script then this is what you want to use: tribe_events_google_maps_api.

    If you choose to dequeue the theme’s script, then you can do it with a conditional statement that ensures it is only removed on calendar pages. So, something like this:

    [php]
    function dequeue_googlemaps() {

    if ( is_tribe_event && is_single() ) {
    wp_dequeue_script( ‘the-theme-script-handle’ );
    }

    }

    add_action( ‘wp_print_scripts’, ‘dequeue_googlemaps’, 100 );
    [/php]

    Cheers!
    Geoff

Viewing 15 results - 151 through 165 (of 274 total)