Your Time:
Our Time:
← Back to discussions

Deque css files and functions/javascript

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 3 replies, 3 voices, and was last updated 11 years, 1 month ago by Anonymous.

  • 2014-11-10 at 7:24 am
    Support Expired
    #5910
    sethbahookey
    Participant
    • Topics: 4
    • Replies: 3
    • Total posts: 7
    • Post count: 3

    Hey, so I’m pretty much done creating my website and I’m looking to optimize it. I am noticing when the site loads a lot of unnecessary CSS and javascript files are loading that I did not utilize at all. I’d also like to remove the testimonials and reservation section as well to speed things up. What is the actual code for doing this?

    I’ve tried something like this… wp_dequeue_style( ‘prettyPhoto’, get_template_directory_uri() . ‘css/prettyPhoto.css’ );} with no luck. I do have a child theme of this so am I typing in the wrong commands?

    Please let me know because the theme is rather bulky with all these ‘features’.

    Thanks,
    Seth

    2014-11-10 at 1:30 pm
    #5911
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Its there in the framework/common/head.php file where you can comment the script which you don’t like to enqueue.

    If you still have any issues you can contact us on the support-aws Skype where we can help you out with that.

    Regards
    Maqk

    2014-11-10 at 10:14 pm
    Support Expired
    #5918
    sethbahookey
    Participant
    • Topics: 4
    • Replies: 3
    • Total posts: 7
    • Post count: 3

    Maqk, would I have to deque them each or can I just comment them out? Thanks

    2015-08-06 at 10:42 am
    #8893
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    @sethbahookey: Sorry for the delay in response. To be dequeued, the script must be enqueued. Attempting to dequeue a script before the script is enqueued will have no effect. So, comment them which are not in use.

You must be logged in to reply to this topic.