Plugin Author
ILLID
(@mihail-barinov)
Hi,
Thanks for your kind words.
Please tell me – is this products list widget your theme default one or are using some plugin to display it?
Regards
Hi Mihail,
Thank you for your response. It’s a theme widget.
Plugin Author
ILLID
(@mihail-barinov)
Can you show me a screenshot of how you add this widget? Perhaps the screenshot of the wp admin area with this theme widget for products display.
Regards
Plugin Author
ILLID
(@mihail-barinov)
I see. Please try to use following custom code snippets:
add_filter( 'awl_labels_hooks', 'my_awl_labels_hooks' );
function my_awl_labels_hooks( $hooks ) {
$hooks['on_image']['archive']['woocommerce_widget_product_item_start'] = array( 'priority' => 10 );
$hooks['before_title']['archive']['woocommerce_widget_product_item_start'] = array( 'priority' => 9, 'js' => array( '.product-title', 'before' ) );
return $hooks;
}
add_action('wp_head', 'my_wp_head');
function my_wp_head() {
echo '<style>.product_list_widget li { position:relative; }</style>';
}
add_filter('awl_js_container_selectors', 'my_awl_js_container_selectors');
function my_awl_js_container_selectors( $product_container ) {
$product_container[] = 'li';
return $product_container;
}
Sorry for the stupid question but where should i put it?
I tried it through the Code Snippets plugin but it didn’t work.
I can give you admin access if you want.
Anyway, thanks for everything.
I believe we will manage to solve it.
Plugin Author
ILLID
(@mihail-barinov)
Strange that it is not working via code snippets plugin. Are you trying this one https://wordpress.org/plugins/code-snippets/? Also you can add this code inside your theme functions.php file.
i tried putting it in functions.php and it works 🙂
just the label is big enough for the widget…can it be made smaller?
I am sending a screenshot
https://ibb.co/bsjkNhf
Plugin Author
ILLID
(@mihail-barinov)
You can use some custom styles to make it smaller. Please try this additional code snippet:
add_action('wp_head', 'my_wp_head2');
function my_wp_head2() {
echo '<style>
.product_list_widget .advanced-woo-labels .awl-product-label { font-size: 10px !important; }
</style>';
}
Thank you very much for your help. I hope these codes help others.
I wish you much success.
🙂
-
This reply was modified 9 months, 2 weeks ago by
drevaxsk.
Now i noticed one thing. It is impossible to click on the product link on the entire upper area where the label is located (marked with a red rectangle). Can we somehow reduce the area?
https://ibb.co/93SHB3M
Plugin Author
ILLID
(@mihail-barinov)
Try to use following additional style:
.product_list_widget .advanced-woo-labels .awl-product-label { width: auto !important; }
Thanks for the answer, but it still doesn’t work… I tried to put the code in the additional CSS in wordpress dashboard, also in the custom CSS in the Advanced Woo Labels plugin.
I made a screen recording https://file.io/gtRxKGzrtsjW
-
This reply was modified 9 months, 2 weeks ago by
drevaxsk.
Plugin Author
ILLID
(@mihail-barinov)
I don’t see that these styles are applied anywhere. Please tell me – how do you add these styles? Also – are you using any caching or assets optimization plugins?
Regards
I tried it through the WPCode Lite plugin, then I put it in WordPress Default ->Additional CSS, also in the theme editor ->style.css and also in the Advanced Woo Labels plugin -> Label Settings -> Custom CSS (screenshot)
No change was seen in either method. I don’t have the code anywhere at the moment.
I use the Seraphinite Accelerator plugin for optimization
https://ibb.co/5cg4d4Z