Title: Remove Generated Footer Scripts/Styles
Last modified: March 7, 2017

---

# Remove Generated Footer Scripts/Styles

 *  Resolved [Fryvisuals](https://wordpress.org/support/users/fryvisuals/)
 * (@fryvisuals)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/remove-generated-footer-scriptsstyles/)
 * I’ve been trying to remove 2 footer links with css in them. The first is a <script
   > tag with an **id=”tmpl-tribe_customizer_css”**. This is a script tag with CSS
   in it… WHY? I’ve searched through all the code looking for the function that 
   generates this. I’m using the free version of the plugin for a simple event listing
   using the default tribes css styles.
 * The second is a normal <style> tag with **id=”tribe_customizer_css”**
 * Where is this coming from? How to dequeue?
    ⌊CSS in wordpress footer⌉ [http://
   imgur.com/a/UiqNk] screenshot of links
    -  This topic was modified 9 years, 2 months ago by [Fryvisuals](https://wordpress.org/support/users/fryvisuals/).
      Reason: fixing img
    -  This topic was modified 9 years, 2 months ago by [Fryvisuals](https://wordpress.org/support/users/fryvisuals/).
    -  This topic was modified 9 years, 2 months ago by [bdbrown](https://wordpress.org/support/users/bdbrown/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Fryvisuals](https://wordpress.org/support/users/fryvisuals/)
 * (@fryvisuals)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/remove-generated-footer-scriptsstyles/#post-8888857)
 * Found it this morning.
 * It’s located in customizer.php line 122
    `add_action( 'wp_print_footer_scripts',
   array( $this, 'print_css_template' ), 15 );` From Function:
 *     ```
       // If we don't have anything on the customizer don't print empty styles
       		// On Customize Page, we don't care we need this
       		if ( ! is_customize_preview() && empty( $css_template ) ) {
       			return false;
       		}
       // All sections should use this action to print their template
       		echo '<script type="text/css" id="' . esc_attr( 'tmpl-' . $this->ID . '_css' ) . '">';
       		echo $css_template;
       		echo '</script>';
   
       		// Place where the template will be rendered to
       		echo '<style type="text/css" id="' . esc_attr( $this->ID . '_css' ) . '">';
       		echo $this->parse_css_template( $css_template );
       		echo '</style>';
       ```
   
 * I don’t get why this is on every single page… Is it poor programming or laziness?
   Honestly, any plugin needs to enqueue their resources ONLY WHERE NEEDED. I don’t
   get it.
 * I’ll fix it myself.
    -  This reply was modified 9 years, 2 months ago by [Fryvisuals](https://wordpress.org/support/users/fryvisuals/).
 *  Thread Starter [Fryvisuals](https://wordpress.org/support/users/fryvisuals/)
 * (@fryvisuals)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/remove-generated-footer-scriptsstyles/#post-8889344)
 * Here’s the fix
    `remove_action( 'wp_print_footer_scripts', array( Tribe__Customizer::
   instance(), 'print_css_template' ), 15 );`
 * Removing these styles while using the free plugin version with tribes default
   template styles does nothing to alter the display.
 *  [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/remove-generated-footer-scriptsstyles/#post-8901082)
 * Hi [@fryvisuals](https://wordpress.org/support/users/fryvisuals/) 🙂
 * > The first is a <script> tag with an id=”tmpl-tribe_customizer_css”. This is
   > a script tag with CSS in it… WHY?
 * That’s because it basically serves the role of a template, not unlike a `<template
   >` element but with better cross-platform results.
 * > Is it poor programming or laziness? Honestly, any plugin needs to enqueue their
   > resources ONLY WHERE NEEDED.
 * In general, I’d absolutely agree that resources should be included only where
   needed.
 * I disagree that this amounts to poor programming or laziness though: we need 
   to support many different themes and environments and this was the most pragmatic
   way to achieve the level of coverage and customizer-support required by our user-
   base.
 * That doesn’t mean it’s perfect and we’ll continue to refine this: to that end,
   if you have specific thoughts on this, we’d welcome your feedback. Do remember
   though that we need to support the possible existence of calendar-related widget/
   shortcode output on any given page and that, as those can be generated or inserted
   dynamically, determining that those elements are present early enough to do things
   differently isn’t easy.
 * Beyond that, glad to hear you hit upon a fix you are happy with — and thank you
   for sharing it 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove Generated Footer Scripts/Styles’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [events](https://wordpress.org/support/topic-tag/events/)

 * 3 replies
 * 2 participants
 * Last reply from: [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/remove-generated-footer-scriptsstyles/#post-8901082)
 * Status: resolved