All-in-One Event Calendar
[resolved] wp_deregister_style not working with All in One Event Calendar (6 posts)

  1. depiction
    Posted 3 years ago #

    All in One Event Calendar adds 2 CSS files to every page, even page that don't have a calendar on them.

    I'm trying to deregister the scripts then manually add them to my calendar page.

    I found the handles in class-ai1ec-calendar-controller.php then added the following to my theme's functions file, but both scripts are still appearing in the header of all pages. How do I remove them?

    function my_deregister_javascript() {
    	add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );


  2. Richard
    Posted 3 years ago #

    Hi depiction,

    We going to have our Technical Support Specialist take a look at this. She will provide a response shortly.

  3. Ula Szczepaniak
    Posted 3 years ago #

    Did you try with wp_enqueue_scripts?

  4. depiction
    Posted 3 years ago #

    You mean wp_deregister_scripts? Yes, I've tried that. Since the CSS files are added in ai1ec via wp_enqueue_style, wp_deregister_style should work.

    I tried deactivating all other plugins to see if it might be a plugin issue. I also tried using the default theme. Neither solved the problem. I'm using WordPress 3.4.2.

  5. ditscheri
    Posted 3 years ago #

    Hi depiction,

    have a look at this code snippet. It removes both the CSS and the JS files:

  6. Richard
    Posted 3 years ago #

    @ditscheri - thanks for this. Certainly might be an option for some users / WP themes.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • All-in-One Event Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic