Home › Forums › Themes Support › Claue › Optimisations
- This topic has 8 replies, 3 voices, and was last updated 5 years, 11 months ago by Harry.
-
AuthorPosts
-
-
December 11, 2018 at 1:07 am #27538
Hello Harry, I will post here all optimisation related questions as it seems to be very important for google
-
December 11, 2018 at 1:08 am #27539This reply has been marked as private.
-
December 11, 2018 at 12:02 pm #27552
Hi Mag,
Please add below code to claue-child > functions.php
if ( ! function_exists( 'jas_claue_enqueue_scripts' ) ) { function jas_claue_enqueue_scripts() { // Google font wp_dequeue_style( 'jas-font-google', jas_claue_google_font_url() ); // Font Awesome wp_dequeue_style( 'font-awesome' ); wp_dequeue_style( 'yith-wcwl-font-awesome' ); wp_dequeue_style( 'fontawesome', JAS_CLAUE_URL . '/assets/vendors/font-awesome/css/font-awesome.min.css' ); // Font Stroke wp_enqueue_style( 'font-stroke', JAS_CLAUE_URL . '/assets/vendors/font-stroke/css/font-stroke.min.css' ); // Slick Carousel wp_enqueue_style( 'slick', JAS_CLAUE_URL . '/assets/vendors/slick/slick.css' ); wp_enqueue_script( 'slick', JAS_CLAUE_URL . '/assets/vendors/slick/slick.min.js', array(), false, true ); // Magnific Popup wp_enqueue_script( 'magnific-popup', JAS_CLAUE_URL . '/assets/vendors/magnific-popup/jquery.magnific-popup.min.js', array(), false, true ); // Isotope wp_enqueue_script( 'isotope', JAS_CLAUE_URL . '/assets/vendors/isotope/isotope.pkgd.min.js', array(), false, true ); // Scroll Reveal wp_enqueue_script( 'scrollreveal', JAS_CLAUE_URL . '/assets/vendors/scrollreveal/scrollreveal.min.js', array(), false, true ); // jQuery Countdown wp_enqueue_script( 'countdown', JAS_CLAUE_URL . '/assets/vendors/jquery-countdown/jquery.countdown.min.js', array(), false, true ); // Enqueue script on single product if ( function_exists( 'is_product' ) && is_product() ) { wp_enqueue_script( 'sticky-kit', JAS_CLAUE_URL . '/assets/vendors/jquery-sticky-kit/sticky-kit.min.js', array(), false, true ); } if ( class_exists( 'WooCommerce' ) ) { wp_enqueue_script( 'wc-add-to-cart-variation' ); wp_enqueue_script( 'jquery-ui-autocomplete' ); // Zoom image if ( is_singular( 'product' ) && cs_get_option( 'wc-single-zoom' ) && !wp_is_mobile() ) { wp_enqueue_script( 'zoom' ); } } // Main scripts wp_enqueue_script( 'jas-claue-script', JAS_CLAUE_URL . '/assets/js/theme.js', array( 'jquery', 'imagesloaded' ), '', true ); // Inline script wp_add_inline_script( 'jas-claue-script', jas_claue_custom_js() ); // Custom localize script wp_localize_script( 'jas-claue-script', 'JAS_Data_Js', jas_claue_custom_data_js() ); // Responsive stylesheet wp_enqueue_style( 'jas-claue-animated', JAS_CLAUE_URL . '/assets/css/animate.css'); // Main stylesheet wp_enqueue_style( 'jas-claue-style', get_stylesheet_uri() ); // RTL stylesheet if ( is_rtl() ) { wp_enqueue_style('jas-claue-rtl', JAS_CLAUE_URL . '/assets/css/rtl.css'); } // Inline stylesheet wp_add_inline_style( 'jas-claue-style', jas_claue_custom_css() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } do_action( 'claue_scripts'); } } add_action( 'wp_enqueue_scripts', 'jas_claue_enqueue_scripts', 10 );
And download google font, font-awesome and include to child theme.
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio-
December 11, 2018 at 9:26 pm #27574
WOW, OK does it include correction to question 2 and 3 or is not possible to fix?
download google font, font-awesome and include to child theme. where shall I upload the downloaded fonts just to main child theme folder?
I also noticed isn’t it already downloaded to /wp-content/themes/claue/assets/vendors/font-awesome/fonts
thank you
-
-
December 11, 2018 at 4:30 pm #27561This reply has been marked as private.
-
December 11, 2018 at 5:08 pm #27564
Hi Van,
This code to remove load font from google and use font on your server.
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
December 11, 2018 at 10:41 pm #27579
No,
Please included to your child theme and put in “fonts” folder and call in style.css file.
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio-
December 12, 2018 at 3:34 am #27587
- so I have added code to child theme functions.php
on my nginx server config I also have this code
pagespeed EnableFilters combine_css;
pagespeed EnableFilters rewrite_css;
pagespeed EnableFilters prioritize_critical_css;
pagespeed EnableFilters inline_css,flatten_css_imports;
pagespeed EnableFilters inline_javascript;
pagespeed EnableFilters combine_javascript;will it be OK to use with your code?
2. is it correct I have copied all content from /wp-content/themes/claue/assets/vendors/font-awesome/fonts to /wp-content/themes/claue-child/fonts
3. and could you please show how to do this and call in style.css file. in which file what shall I edit?
thank you
-
-
December 12, 2018 at 11:46 am #27598
Hi,
You customize so much, please hire a freelancer to help you do it.
Regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio
-
-
AuthorPosts
You must be logged in to reply to this topic.