gore.m
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: How remove IMG classes?OK I disabled Woocommerce and used
add_filter('get_image_tag', 'strip_entire_image_class'); function strip_entire_image_class($html) { return preg_replace('/ class="(.*)"/', '', $html); }
Still It is not working
attachment-large size-large wp-post-image
.Forum: Plugins
In reply to: [WP woocommerce featured product by category] Slug instead of ID?Thanks you.
I know how find ID, I just wanted to use slug because Im using shortcodes in template… it would be much easier to use slug – because of reinstalling, moving theme, or any change in IDs (slugs often remain same).Thanks you
Forum: Developing with WordPress
In reply to: How remove IMG classes?Thanks you.
Still cant get it work :-/
So for to be clear, Ive tried:– I disabled “Compress JPEG & PNG images” plugin, that was only one plugin for images.
– Ive triedadd_filter( 'get_image_tag_class', '__return_empty_string', 9999 );
or
function strip_entire_image_class($html) { return preg_replace('/ class="(.*)"/', '', $html); } add_filter('get_image_tag', 'strip_entire_image_class', 999);
than
– I inserted image with Media > Upload > Chose > edit > Click on link above image / or Insert image to post > Publish > Preview
Nothing happened.
Still have classesattachment-medium size-medium
orattachment-large size-large wp-post-image
orattachment-shop_single size-shop_single wp-post-image
.Im using _s theme, Ive tried Twenty Eleven with same output.
- This reply was modified 7 years, 9 months ago by stephencottontail.
- This reply was modified 7 years, 9 months ago by gore.m.
Forum: Developing with WordPress
In reply to: How remove IMG classes?Thanks you.
Strange… it doesnt work for me.
I dont have any get_image_tag() in function.php or in templates.
Classes output even if images are newly inserted. ??According to your suggestion, what about add my own class and filter default classes out?
Forum: Developing with WordPress
In reply to: How remove IMG classes?Hello Niels,
thanks you.
No, you didn’t mentioned why you wouldn’t recommend it ?? Can you do it please?
Im not using img classes, so I thought it is good idea to strip them out.Snippet doens’t work:
add_filter('get_image_tag', 'strip_entire_image_class'); function strip_entire_image_class($html) { return preg_replace('/ class="(.*)"/', '', $html); }
- This reply was modified 7 years, 10 months ago by gore.m.
Forum: Plugins
In reply to: [WooCommerce] Cross sells products displayed twice – 3.0.1Seems to be working since 3.0.2 .-)
Thanks youForum: Plugins
In reply to: [WooCommerce] Cross sells products displayed twice – 3.0.1It output one ul with same posts as li.
- This reply was modified 7 years, 11 months ago by gore.m.
Forum: Plugins
In reply to: [WooCommerce] Cross sells products displayed twice – 3.0.1Localhost ??
Forum: Plugins
In reply to: [WooCommerce] Cross sells products displayed twice – 3.0.1Thanks you.
Im sorry, but your suggested solution is not working, I had added function:
add_filter( 'woocommerce_cross_sells_total', 'limit_woocommerce_cross_sells_total' ); function limit_woocommerce_cross_sells_total() { return 4; }
If I removed it cross sell product are displayed twice again.
Forum: Plugins
In reply to: [WooCommerce] Cross sells products displayed twice – 3.0.1Is there way to display only cross sells products for last added item?
- This reply was modified 7 years, 11 months ago by gore.m.
Forum: Plugins
In reply to: [WooCommerce] Cross sells products displayed twice – 3.0.1Yes, it seems to be working fine .-)
$this->set_prop( 'cross_sell_ids', array_unique( array_filter( (array) $cross_sell_ids ) ) );
Thanks you
Forum: Plugins
In reply to: [WooCommerce] Remove link on featured image – since 3.0.0Thanks you. Still cant get it work ??
I enabled WP_Dedug, nothing happened, … result is: blank page, only header is displayed, rest of page is blank without any error notice.
I think I dont understand exactly what Claudiu Lodromanean mean by: “it passes the attachment id instead of the post id as the second argument”.
May I ask for help to finish code?
Thanks youForum: Plugins
In reply to: [WooCommerce] Remove link on featured image – since 3.0.0I done first part:
function custom_unlink_single_product_image( $html, $post_id ) { return get_the_post_thumbnail( $post_id, apply_filters( 'woocommerce_single_product_image_thumbnail_html', 'shop_single' ) ); } add_filter('woocommerce_single_product_image_thumbnail_html', 'custom_unlink_single_product_image', 10, 2);
But second part is tough one ?? I tried everything, but result is blank page. May I ask for detailed information? .-)
Thanks you
Forum: Plugins
In reply to: [WooCommerce] Remove link on featured image – since 3.0.0Im little confused.
I didnt add new gallery features support to my theme (I dont want them) and Im using only main product image.
So… there should not be hover link on main product image as default? I have it there :-/Thanks you
Forum: Plugins
In reply to: [WooCommerce] Remove related Products – not working 3.0.0Cool! Thanks you!