Skip Navigation

[Resolved] Want to remove hard-coded style and script

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Shane 6 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1089576
Screen Shot 2018-08-22 at 1.46.06 PM.png

See screenshot of the hard-coded bits:

<ol>

  • views-extra-css-ie7:
  • views-extra-css
  • ct-extra-css
  • </ol>

    #1 and #2 are in /wp-content/plugins/wp-views/embedded/inc/wpv.class.php
    #3 is from /wp-content/plugins/wp-views/embedded/inc/views-templates/wpv-template.class.php

    I tried this:

    remove_action( 'wp_footer', array( 'WP_Views', 'wpv_meta_html_extra_css' ), 5 );
    remove_action('wp_footer', array('WPV_template', 'wpv_meta_html_extra_css'), 5);
    

    but these methods are not static.

    I want to remove these from certain pages (a web app), so I need to do so programmatically and no Content Template or View styling/scripts is needed.

    Thank you.

    #1090425

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi Clifford,

    Thank you for contacting our support forum.

    Is this loaded on pages that don't have content templates loaded?

    Please let me know.

    Thanks,
    Shane

    #1090435

    I get the Content Template programmatically but the Content Template is assigned to this custom post type... just not auto-displayed. It has no styling/scripts loaded along with it (just basic HTML) so unsure why anything extra like this output would 1) be appearing and 2) be necessary... therefore, I want it gone.

    #1091290

    Shane
    Supporter

    Languages: English (English )

    Timezone: America/Jamaica (GMT-05:00)

    Hi Clifford,

    The reason why it is appearing is because the css is loading dynamically.

    Some code is needed to check if there is actual css to load. If no css is found the script loads nothing, however if css is found then it will load the css file.

    It is actually a core functionality that is needed for the content template.

    Thanks,
    Shane