This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Remove unused scripts

Open 8 replies premiumthemetheme-vantage
Started · Latest reply by Andrew Misplon

Hi,
I’d really like to remove some of the unused scripts when the theme loads.
I have disabled the slider in the theme settings, but the slider script still loads on the blog.
Can you help?

URL: http://beo.guldgrisen.dk/sneaky

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

8
  1. Andrew Misplon Staff

    Hi Pål

    Thanks for reaching out. This is something can be achieved quite easily. I made a child theme for you but I see you’re already using one so you can just check out what I’ve done in the second function here:

    https://github.com/siteorigin/vantage-child/blob/feature/dequeue-flexslider/functions.php

    This needs to be carried out in the functions.php file of your child theme.

    Hope that helps. Let me know how you come along.

  2. Pål Heick Private

    This is a private message.

  3. Pål Heick

    Forgot to wrap:

    <script type="text/javascript" src="http://beo.guldgrisen.dk/wp-content/themes/vantage/js/jquery.flexslider.min.js?ver=2.1"></script>
  4. Andrew Misplon Staff

    Functions
    If possible, please paste a copy of your functions file here, wrapped in code tags as indicated below the comment field. If your child functions is really long you could use http://codepen.io/ or similar site to paste the code and send through a link.

    Widget Areas
    If you’re registering a new widget area in the child functions then that would have been something added on your side. ayurfoods is the textdomain. It should read ‘vantage’. You can refer to the vantage_widgets_init function in the parent functions.php file for a reference on adding widget areas.

  5. Pål Heick Private

    This is a private message.

  6. Andrew Misplon Staff

    Thanks, I see the problem. In 2.3.3 the script handle was different. Please change:

    'vantage-flexslider'

    to just:

    'flexslider'
  7. Pål Heick

    Ok, I’ve changed as described, but

    <script type="text/javascript" src="http://beo.guldgrisen.dk/wp-content/themes/vantage/js/jquery.flexslider.min.js?ver=2.1"></script>

    still appears in header?

  8. Andrew Misplon Staff

    Thanks for the feedback. If possible, please send through a zip copy of your child theme to [email protected] and I’ll dive in deeper.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread