Support for Envato Buyers › Forums › DGWork › Optimizing CSS/Javascript
- This topic has 23 replies, 2 voices, and was last updated 8 years, 1 month ago by FocuxTheme Support.
-
AuthorPosts
-
-
November 29, 2016 at 7:57 am #10912cwhlinMember
Hi. In an effort to optimize my site performance, Google Pagespeed keeps saying that I utilize too many rendering-block external CSS/JS files. I’ve tried several plugins to minify them but it’s not really working. Should I create one large CSS file in the child-theme instead? Can you optimize the use of external CSS/JS in the next version? Thank you so much. I love your theme, just trying to make it as perfect as possible!
-
November 30, 2016 at 5:10 pm #10917FocuxTheme SupportKeymaster
Hi
Those css/js files are generated by some plugins(revolution slider, visual composer), I can’t control it by changing theme files and I haven’t enqueued any external files into the theme, except a google font css file. But if you use any other google font for the text in these plugins, they will enqueue the new google font CSS files into your page. So, I activated Better WordPress Minify plugin for you, it will minify multiple CSS/JS files into one file automatically, and you can remove those unneccessary external CSS/JS files via BWP Minify > Manage enqueued files tab.
By the way, I deactivated two plugins ‘Autoptimize’ and ‘Fast Velocity Minify’ which you use to optmize the page speed, because your page was broken by those plugins.
Thanks
-
November 30, 2016 at 11:58 pm #10924cwhlinMember
Thank you so much!
-
December 1, 2016 at 3:25 am #10925cwhlinMember
I don’t know what’s going on… I just checked the site and it looks completely off. Can you please check?
littlechinesereaders.com
I’ve disabled all the CSS-related plugins.
-
December 1, 2016 at 3:49 am #10926cwhlinMember
I think I found the mistake. I downloaded the latest version of the theme but I clicked on “download only wordpress files” and it gave me a .zip file that I think is incomplete. When I downloaded “All Files” and uploaded the zip files there, it went back to working just fine.
Only issue that the logo is not showing up…
-
-
December 1, 2016 at 8:38 am #10932FocuxTheme SupportKeymaster
Hi
Maybe that’s because the first time you update the theme was interrupted by the incomplete file, then you installed and activated the theme again, WordPress will clear the customize settings as a new theme setup, so you have to set the LOGO again in the customize.
A small tip, you can install WP Envato Market plugin which is developed by Envato, https://github.com/envato/wp-envato-market connect your Envato API, then you will able to automatically one click to update the theme such as you update some plugins.
By the way, Also I checked your page with google page speed, I noticed that almost all render-blocking CSS files are google font files which are imported by Visual Composer and Revolution Slider, you can remove the repeat fonts via BWP Minify, but I found Revolution slider enqueued the google fonts again without handle string so that the user can’t manually remove or manage the external CSS files, I will give them a feedback for this issue.
Thanks
-
December 1, 2016 at 10:47 am #10935cwhlinMember
Thank you for the great tips. I still can’t get the global logo to save. I also notice the themevan shortcodes aren’t showing up so there must be something wrong with my last update. I will install the theme again.
-
December 1, 2016 at 11:04 am #10936cwhlinMemberThis reply has been marked as private.
-
December 1, 2016 at 4:23 pm #10940FocuxTheme SupportKeymaster
I’m so sorry for the LOGO issue, this is my mistake. Please download this changed file https://www.dropbox.com/s/kehmczcstppcblp/template-tags.php.zip?dl=0 , upload it to the parent theme folder “dgwork/inc/functions/”, override the old file.
-
December 1, 2016 at 4:25 pm #10941FocuxTheme SupportKeymaster
I see the themevan shortcodes is display normal, right? I tested themevan shortcode 1.1.1 on my demo site, it works properly http://demo.themevan.com/dgwork/
Am I missing anything?
-
December 1, 2016 at 11:41 pm #10944cwhlinMember
Logo is resolved. Themevan shortcodes are displaying fine on the frontend but cannot be edited via visual composer in the backend.
-
December 2, 2016 at 8:46 am #10948FocuxTheme SupportKeymaster
So much sorry, now you can reinstall themevan-shortcodes plugin here http://www.themevan.com/repo/plugins/themevan-shortcodes.zip , it will work properly in backend.
-
December 2, 2016 at 10:13 am #10952cwhlinMember
Works perfectly now. Thanks!
-
December 2, 2016 at 10:17 am #10953cwhlinMember
I take it back… the new themevan-shortcodes crashed my site (I had to move my site because the previous one also crashed)…
-
December 2, 2016 at 3:42 pm #10956FocuxTheme SupportKeymaster
Have you got any error message when your site was crashing? Because this time I tested the new themevan shortcodes with dgwork theme on my test site, it was working fine. Not sure anything I missed?
-
December 3, 2016 at 2:19 am #10958cwhlinMember
No. I moved the site and installed everything anew but still cannot see themevan shortcodes with visual composer. I can use the shortcodes directly, just cannot see them in visual composer (which I believe just updated also.. maybe that’s the problem)?
If I may give a small suggestion, I also use the plugin EDD Sale Price to show items are on-sale. It would be cool if the FREE badge would also show up if the sale price is $0 (I tried changing the template, but haven’t figured out a solution because I think the sale price, if left empty, is read as equal to 0).
-
December 3, 2016 at 7:43 pm #10960FocuxTheme SupportKeymaster
Maybe because Visual Composer issue, the new version of ThemeVan Shortcodes doesn’t display properly in VC editor, so I have rebuild those ThemeVan Shortcodes for you, they are working in Visual Composer now.
For second issue, did you actually mean you want to change $0.00 to 0? It’s not the theme issue, Easy digital downloads plugin controls the price format displaying, so may be you have to ask this question to the plugin developer.
Thanks
-
December 4, 2016 at 11:46 pm #10961cwhlinMember
1. THemevan shortcodes working in Visual Composer. Thank you.
2. I meant I modified the template for product grid slightly so that the free badge would also show up when I use the EDD Sale Price plugin and set the sale price to $0. Example — http://www.littlechinesereaders.com/books/
3. I had to turn off BWP Minify because it breaks the post/page templates. I guess I will see if I can minify the CSS/JV manually.Thank you for everything! You’ve been a great support.
-
December 6, 2016 at 4:15 pm #10967FocuxTheme SupportKeymaster
Whenever the price is set to $0, the free badge will show up, I still don’t understand how the template you want it to display as, sorry, could you let me know more details? Because I don’t familiar with the third-party plugin you used, it’s a little out of the theme issue support.
-
December 13, 2016 at 2:17 am #10997cwhlinMember
No worries. I modified the Themevan Shortcode product grid as follows so that the free badge will show up when the sales price is 0 (and not just when the product price is 0).
$sale_price = get_post_meta($post->ID, ‘edd_sale_price’, true);
$preview=esc_attr(get_post_meta($post->ID, “_dgwork_preview_url”, true));
$short_description=esc_attr(get_post_meta($post->ID, “_dgwork_short_description”, true));
if (!empty($sale_price)){
$price = $sale_price;
}
else{$price=esc_attr(get_post_meta($post->ID, “edd_price”, true));}if($price == 0){
$freelabel = ‘<div class=”freeLabel”>’.esc_attr__(‘Free!’,’tvms’).'</div>’;
}else{
$freelabel = ”;
}I do have another quick question. Currently the two buttons (when hovering over the featured image) in the product grid shows Details and Add to Cart). What’s the href link if I would like the Add to Cart change the link to Download? Thank you!
<i class=”fa fa-eye”></i>’.esc_attr__(‘Details’,’tmvs’).’
ID.'” class=”button add_to_cart”><i class=”fa fa-shopping-cart”></i> ‘.esc_attr__(‘Buy Now’,’tmvs’).’
-
-
December 13, 2016 at 8:23 am #11001FocuxTheme SupportKeymaster
Hi
You should also edit the Themevan Shortcode product grid function, you can find the following codes
<a href="'.esc_url(get_permalink()).'" class="button details"><i class="fa fa-eye"></i>'.esc_attr__('Details','tmvs').'</a> <a href="checkout?edd_action=add_to_cart&download_id='.$post->ID.'" class="button add_to_cart"><i class="fa fa-shopping-cart"></i> '.esc_attr__('Buy Now','tmvs').'</a>
The second is the add to cart button, you can change the link there “checkout?edd_action=add_to_cart&download_id=’.$post->ID.'”
Don’t forget that don’t modify the plugin, copy the function to your child theme.
Thanks
-
December 21, 2016 at 12:19 am #11022FocuxTheme SupportKeymaster
I’ve added the ‘download link’ feature in the next version and I will release it today or tomorrow.
In the new version, I added external checkout/download link option that you can set the file download link, and when the price is 0, the add to cart button will changed to ‘download’.
Also, new product templates and predefined section templates is added in the new version, so after I finish to test the product template, I will release it soon!
Thanks
-
-
AuthorPosts
- You must be logged in to reply to this topic.