温唯
Forum Replies Created
-
Same question.
I’ve added these codes :
function allowed_mime_types( $types ) { // Disallow offload of png. unset( $types['png'] ); // Allow offload of PDFs. $types['pdf'] = 'application/pdf'; return $types; }
to function.php file to prevent .png from being uploaded to s3 , but it still not work , images with .png still be offloaded to s3 bucket.
Which step did I missed?
Hi @rajeevrf
Thank you for taking the time to help me.
I’ve added those codes to function.php file of child theme , but still caused critical error the same with in Snippet Code Plugin.If I delete
add_filter( 'as3cf_pre_update_attachment_metadata', array( $this, 'pre_update_attachment_metadata' ), 10, 4 );
from those codes, it won’t cause error but still cannot prevent the image from being uploaded to s3.Maybe there is something wrong with my site or theme(OceanWP).
Anyway,Thank you so much.
I’ll look for other solution to prevent images from being uploaded to s3 for temporally.Hi @rajeevrf
Thank you so much for replying.Do you mean this file : “wp-config.php” which is under “public_html”?
and where to add those codes?
anywhere or at the end or before
/* That's all, stop editing! Happy blogging. */
Hi @rajeevrf
Thank you for taking time replying.
But that code is not work to me and cause critical error to my site due to add that code
add_filter( 'as3cf_pre_update_attachment_metadata', array( $this, 'pre_update_attachment_metadata' ), 10, 4 );
Fatal error: Uncaught Error: Using $this when not in object context in public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()'d code:21 Stack trace: #0 /public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(446): eval() #1 /public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(534): execute_snippet('function pre_up...', 47) #2 /public_html/wp-includes/class-wp-hook.php(287): execute_active_snippets('') #3 /public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #4 /public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #5 /public_html/wp-settings.php(409): do_action('plugins_loaded') #6 /public_html/wp-config.php(8 in?/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(446) : eval()'d code?on line?21 There has been a critical error on your website. Please check your site admin email inbox for instructions.
I’ve find these JS code below:
const tabOpener = function(tab) { // Simulate a click on that tab. if ( typeof tab === 'string') { const currentTab = jQuery( '.' + tab + '_tab' ); currentTab.children('a').click() } // Scroll to that tab. jQuery('html, body').animate({ scrollTop: jQuery( '#tab-' + tab ).offset().top }, 300); } jQuery(document).ready(function($) { const { hash } = window.location; let tab; // If a # exists in the url lets see if its a tab. if ( hash ) { tab = hash.replace('#', ''); return tabOpener( tab ); } // On click we'll check to see if the event target has a tab hash. $('body').on('click', function(e) { if ( e.target.hash && ! e.target.hash.includes('#tab') ) { tab = e.target.hash.replace('#', ''); return tabOpener( tab ); } }); });
And it works well.
Hope can help others.Im clear.
That is due to I enabled Preload .Forum: Themes and Templates
In reply to: [OceanWP] Hide price code not work to function.phpHi @abhikr781
It really work.
Thank you so much for taking time replying.Forum: Plugins
In reply to: [Comments - wpDiscuz] User label not in its area on mobileThank you so much for taking time replying.
Here is the link:
https://miriammibao.com/sunscreen-know-how/hi @razyrx
Thanks for taking time replying.
I’ve created tabs with “Product Tabs Manager for WooCommerce plugin” , it works and looks well.
What I want to do is when I click on a link in description area,it will auto switch to specific tab,like this screenshot:
https://upload.cc/i1/2020/10/13/fN1dvn.pngIs there any code(css/js or others) to do it?
Forum: Plugins
In reply to: [Comments - wpDiscuz] User label not in its area on mobileBut on mobile , The user label is not in its comment area , it is moved to the area of forward comment area.
like this screenshot:
https://upload.cc/i1/2020/10/12/fYGOL3.pngI don’t think that is normal design, because no such problem on desktop .
Hi ,
I want to add some details that are not clear in my question.
1.I have 34 products in WooCommerce product.
2.“Infinite Scroll” works well in default WooCommerce “Shop Page” that may be created auto by OceanWP.
That Shop Page’s link is:
https://weing.com.tw/store-page/3.Though the default WooCommerce “Shop Page” can not be edited , but I can customize some style in Appearance> Customize >WooCommerce>Archives.
And the settings I’ve customized with “Shop Posts Per Page>12” and “Shop Columns>3” and “Pagination Style>infinite scroll”
as this screenshot:
https://upload.cc/i1/2020/10/13/zKxkiR.jpg4.When I try to add WooCommerce short code [products] to display products to other page , the setting customized to the default WooCommerce “Shop Page” will not apply to that page with short code [products].
That page’s link is:
https://weing.com.tw/add-shortcode-products/Is there any suggestion to display products in other page with the style I’ve customized in “Appearance> Customize >WooCommerce>Archives” like the default WooCommerce “Shop Page”?
In CLOUDFLARE DNS settings:
Create CNAME:the “name field” should be the same with the subdomain of content.
for example:
name: cdn-bucket-name
Content: cdn-buket-name.s3-eu-west-2.amazonaws.comI followed this:
https://www.ads-software.com/support/topic/cloudflare-30/
and finally resolved it .
Forum: Themes and Templates
In reply to: [OceanWP] Hide price code not work to function.phpUpdated
I’ve used that code applying to StoreFront theme , and it works!
But when I switch to OceanWP , that code would not work.Besides, I found there is a function in Customize/Archives/Product/Elements Positioning in OceanWP , which can turn on or turn off the Price/Rating, which can hide price ㄙonly in shop page , and not affect single product page .
But the function would appear only in [Default Style] in [Product Style].
Since I’ve choose [Hover Style],then the function [Elements Positioning] will not appear , so I can not use that simple way .Is there any code to suit for functions.php of OceanWP to hide price only from shop page?
Update informations.
Hi,
I’ve updated Clearfy to the latest v1.7.2 , but still not work to unlogged user and visitors.
That means when I login my website as admin , [Remove Style Files Version] and [Remove Javascript Files Version] will not conflict with ToTop Button of AVADA theme(ToTop Button work well) , but when I log out or as a visitor , those 2 functions enabled will conflict with ToTop Button (ToTop Button disappeared).