This topic has 4 replies, 2 voices, and was last updated 8 years by Splendor.

  • Author

    Tagged: , ,

  • #74686
     Splendor
    Participant

    I wonder, as is see that several js are called, i guess this comes from Visual Composer and some comes from the theme. I’m getting rid of everything that I don’t need and already delete nearly all plugins and compressed files.

    I would like to know which plugin does what:

    kleo/assets/js/plugins/carouFredSel/jquery.carouFredSel-6.2.0-packed.js
    kleo/assets/js/plugins/carouFredSel/helper-plugins/jquery.touchSwipe.min.js – Mobile?
    js_composer/assets/lib/bower/isotope/dist/isotope.pkgd.min.js
    plugins/buddypress-media/lib/touchswipe/jquery.touchSwipe.min.js mobile?
    kleo/assets/js/plugins/magnific-popup/magnific.min.js – this drive the kleo gallery right?

    What does app.min.js, init.js and modernizer? They drive the whole theme right? If i want a very clean theme what should get rid of first that comes with the theme?

    As I’m trying to get rid of js and render blocking and increasing speed. I need to really think what I need in place and as well what is coded in the theme. As also rtmedia gone wild and give my install additional 10 supersmall plugins, I need to think about how I’m going to approach certain things. As well, I have about 30 plugins installed, they are mostly very small, except my seo, ithemes security (seams to be very heavy, might change to wordfence) buddypress, bbpress and soon wooocommerce.

    #74727
     Splendor
    Participant

    Also what things i have noticed that same type of files gets loaded, for example the touchswipe, are they customized in some way for that plugin or theme, for loading the two files that do the same thing is of course not good better to call one source and so on..

    #74741
     Abe
    Keymaster

    Hello, here is what they are for:
    kleo/assets/js/plugins/carouFredSel/jquery.carouFredSel-6.2.0-packed.js – this is used for the carousels in the theme like image galleries, posts sliders.

    kleo/assets/js/plugins/carouFredSel/helper-plugins/jquery.touchSwipe.min.js – mobile swipe interactions for the carousels/galleries from Kleo

    js_composer/assets/lib/bower/isotope/dist/isotope.pkgd.min.js – used on masonry style like blog grid, members grid listing

    plugins/buddypress-media/lib/touchswipe/jquery.touchSwipe.min.js mobile? – same as the one above and we will remove this one since Kleo already loads it

    kleo/assets/js/plugins/magnific-popup/magnific.min.js – this is used for the popup when clicking an image to view it bigger or for the woocommerce quick view popup

    to remove them you should add this in your child theme

    COPY CODE
    
    add_action( 'wp_enqueue_scripts', 'kleo_my_remove_scripts', 9999 );
    function kleo_my_remove_scripts() {
        wp_dequeue_script('magnific-popup');
        wp_dequeue_script('caroufredsel');
        wp_dequeue_script('jquery-touchswipe');
        wp_dequeue_script('isotope');
        //rtmedia
        wp_dequeue_script('rtmedia-touchswipe');
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #74744
     Splendor
    Participant

    Thanks a lot for the explanation. This is very important. It’s great you could check this out when running all of the plugin that comes with the theme and for buddypress, rtmedia, bbpress and woocommerce. So things don’t get loaded twice. I see a lot of discussions about a slow theme, mostly it’s because bad host and no cache, no cdn and no gzip for example.
    It could be be good to start with this part also, to just use what is needed and also theme loads exactly what is needed.

    As I see as well, rtmedia runs a magnific-popup to, i don’t know if it’s custom also.
    Everything takes resources and even if a run a pretty good server, this won’t hold if I don’t get down and really get picky unfortunately.

    I will start testing a bit now with your code, Thanks @abe! 🙂

    #77035
     Splendor
    Participant

    Hi @abe

    I wonder what does init.js, app.min.js and modernizer? As I’m combining files I want to know what they are doing in theme. It’s easier to find and understand conflicts.

    Also I found this code which seams very good:

    COPY CODE
    add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );
    if ( !is_page('Events') ) { 
    wp_deregister_script( 'wpng-calendar' ); 
    wp_deregister_script( 'date-js' ); 
    wp_deregister_script( 'thickbox-js' ); 
    wp_deregister_script( 'jquery-js' ); 
    wp_deregister_script( 'wiky-js' ); 
    }
    }

    Which you deregister script in certain pages expect in those page you want those script to load. Is the that possible to do this on post-type? For example the blog or buddypress?

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Getting rid of certain things in theme’ is closed to new replies.

Log in with your credentials

Forgot your details?