Label or text between attributes list
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from Carlo on October 11, 2021, 09:25Hello,
is it possible to add a label or a text between some attributes?
Like, if i need to add a text after the first three attributes in list and before the subsequent ones, is it possible?
Thank you.
Hello,
is it possible to add a label or a text between some attributes?
Like, if i need to add a text after the first three attributes in list and before the subsequent ones, is it possible?
Thank you.
Quote from Pablo Borysenco on October 11, 2021, 12:27Hello
You can try this extension - https://products-filter.com/extencion/sections
OR use this hook - 'woof_before_draw_filter'
An example:
do_action('woof_before_draw_filter',function( $key, $shortcode_atts){
if($key == 'pa_color'){
echo "Any text";
}
},20,2);
Hello
You can try this extension - https://products-filter.com/extencion/sections
OR use this hook - 'woof_before_draw_filter'
An example:
do_action('woof_before_draw_filter',function( $key, $shortcode_atts){
if($key == 'pa_color'){
echo"Any text";
}
},20,2);
Quote from Carlo on October 11, 2021, 12:50Thank you, either method i think will do the trick.
Just one question: with the "sections" extension, it would be possible to have one section opened by default (i mean when you open the page)? Because if i understand correctly only the title of the section is shown and the section is closed by default.
Thank you!
Thank you, either method i think will do the trick.
Just one question: with the"sections" extension, it would be possible to have one section opened by default (i mean when you open the page)? Because if i understand correctly only the title of the section is shown and the section is closed by default.
Thank you!
Quote from Pablo Borysenco on October 12, 2021, 11:24Hello
with the "sections" extension, it would be possible to have one section opened by default - Unfortunately no
Hello
with the"sections" extension, it would be possible to have one section opened by default - Unfortunately no
Quote from Carlo on October 14, 2021, 09:38Ok,
i've tried to insert the hook that you provided in the function.php file of my child theme but it's not working.
Am i missing something?
Thanks
Ok,
i've tried to insert the hook that you provided in the function.php file of my child theme but it's not working.
Am i missing something?
Thanks
Quote from Pablo Borysenco on October 14, 2021, 10:41Hello
Please drop me wp-admin access - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130637.png I will check it
Hello
Please drop me wp-admin access - https://share.pluginus.net/image/i20210618130558.png -> https://share.pluginus.net/image/i20210618130637.png I will check it
Quote from Carlo on October 14, 2021, 11:07I've added wordpress and ftp access (in case you need to modify functions.php file of child theme).
I've removed the hook right now, you can add it directly.
Thank you!
I've added wordpress and ftp access (in case you need to modify functions.php file of child theme).
I've removed the hook right now, you can add it directly.
Thank you!
Quote from Pablo Borysenco on October 14, 2021, 11:21I'm sorry it's my fault. I gave the wrong code
now I pasted this code:
add_action('woof_before_draw_filter',function( $key, $shortcode_atts){
if($key == 'pa_marca'){echo "<h2>Any text!!!</h2>";
}
},20,2);
Result : https://c2n.me/4dEDhu7.png
I'm sorry it's my fault. I gave the wrong code
now I pasted this code:
add_action('woof_before_draw_filter',function( $key, $shortcode_atts){
if($key == 'pa_marca'){
echo"<h2>Any text!!!</h2>";
}
},20,2);
Result : https://c2n.me/4dEDhu7.png
Quote from Carlo on October 14, 2021, 11:47Thank you very much, this is exaclty what i needed!
The ticket is resolved for me, thanks again.
Thank you very much, this is exaclty what i needed!
The ticket is resolved for me, thanks again.
Quote from Carlo on December 1, 2021, 17:08I'm sorry to re-open tho topic but i've noticed that the solution that you have proponed is always visible, even if the attribute is not shown in a category.
I'll explain with an example: i have an attribute "size" that is applied on products in category "A" but not on products in category "B". So i see the attribute in the sidebar only if i'm on category page "A". If i add a Label before the attribute "size" via the shortcode that you've provided, i see the label even in category "B" page, even if the corresponding attribute is not visible.
There is a code to add to force the labels to show up only if the corresponding attribute is shown?
Thank you!
I'm sorry to re-open tho topic but i've noticed that the solution that you have proponed is always visible, even if the attribute is not shown in a category.
I'll explain with an example: i have an attribute"size" that is applied on products in category"A" but not on products in category"B". So i see the attribute in the sidebar only if i'm on category page"A". If i add a Label before the attribute"size" via the shortcode that you've provided, i see the label even in category"B" page, even if the corresponding attribute is not visible.
There is a code to add to force the labels to show up only if the corresponding attribute is shown?
Thank you!
Quote from Pablo Borysenco on December 2, 2021, 12:24Hello
Unfortunately, we do not have a good solution for this.
All I can suggest is text display restrictions by category:
$cat_slug = "slug of the category for which you want to hide the text";
$cat_query = "ID of the category for which you want to hide the text" . "-product_cat";
if($key == 'pa_marca' && ( ! is_product_category($cat_slug) || (iseet($_GET['really_curr_tax']) && $_GET['really_curr_tax'] == $cat_query))){
echo"<h2>Any text!!!</h2>";
}
Hello
Unfortunately, we do not have a good solution for this.
All I can suggest is text display restrictions by category:
$cat_slug ="slug of the category for which you want to hide the text";
$cat_query ="ID of the category for which you want to hide the text" ."-product_cat";
if($key == 'pa_marca' && ( ! is_product_category($cat_slug) || (iseet($_GET['really_curr_tax']) && $_GET['really_curr_tax'] == $cat_query))){
echo"<h2>Any text!!!</h2>";
}
Quote from Carlo on December 3, 2021, 11:25Thsi will be perfect for me, but i've implemented the code (i have substituted "iseet" with "isset") and the labels are not visible even in the other categories.
This is the code:
$cat_slug ="allestimenti";
$cat_query ="57" ."-product_cat";
add_action('woof_before_draw_filter',function( $key, $shortcode_atts){
if($key == 'pa_segmento-lcv' && ( ! is_product_category($cat_slug) || (isset($_GET['really_curr_tax']) && $_GET['really_curr_tax'] == $cat_query))){echo "<p>TIPOLOGIA MEZZO</p>";
}
},20,2);
Thsi will be perfect for me, but i've implemented the code (i have substituted"iseet" with"isset") and the labels are not visible even in the other categories.
This is the code:
$cat_slug ="allestimenti";
$cat_query ="57" ."-product_cat";
add_action('woof_before_draw_filter',function( $key, $shortcode_atts){
if($key == 'pa_segmento-lcv' && ( ! is_product_category($cat_slug) || (isset($_GET['really_curr_tax']) && $_GET['really_curr_tax'] == $cat_query))){
echo"<p>TIPOLOGIA MEZZO</p>";
}
},20,2);
Quote from Pablo Borysenco on December 3, 2021, 12:51Hello
Ok! Try to move this code - https://share.pluginus.net/image/i20211203135013.png
Hello
Ok! Try to move this code - https://share.pluginus.net/image/i20211203135013.png
Quote from Carlo on December 6, 2021, 09:58Thank you very much, now is working.
Just a last question: i need to hide the labels even on subdirectories of the "allestimenti" category.
Is it possible?
Thank you very much, now is working.
Just a last question: i need to hide the labels even on subdirectories of the"allestimenti" category.
Is it possible?
Quote from Pablo Borysenco on December 6, 2021, 13:21Hello
Please drop me a screenshots- what do you want to hide
Hello
Please drop me a screenshots- what do you want to hide
Quote from Carlo on December 6, 2021, 16:11The code that you've provided is working, but only on one category --> "allestimenti"
Since "allestimenti" have sub-categories, how can i hide the labels in these subcategories?
In the screenshot you can see that the labels are visible in the category "allestimenti" --> "mezzi-con-frigo"
https://tinyurl.com/y5zcwbeu
https://tinyurl.com/yx8tjsx6
Thanks!
The code that you've provided is working, but only on one category -->"allestimenti"
Since"allestimenti" have sub-categories, how can i hide the labels in these subcategories?
In the screenshot you can see that the labels are visible in the category"allestimenti" -->"mezzi-con-frigo"
Thanks!
Quote from Pablo Borysenco on December 7, 2021, 11:23Hello
In this case, you need to make this code for each category.
Hello
In this case, you need to make this code for each category.
Quote from Pablo Borysenco on December 7, 2021, 11:40An example(without test)
add_action('woof_before_draw_filter',function( $key, $shortcode_atts){
$cat_slugs =array ("allestimenti", "all_slugs", 'all_slags');
$cat_ids = array(57, 58, 59);
$really_curr_tax = false;
if(isset($_GET['really_curr_tax']))
foreach($cat_ids as $id){
$cat_query =$id ."-product_cat";
if( $_GET['really_curr_tax'] == $cat_query){
$really_curr_tax = true;
}
}
if($key == 'pa_segmento-lcv' && ( ! is_product_category($cat_slugs) || $really_curr_tax )){
echo"<p>TIPOLOGIA MEZZO</p>";
}
},20,2);
An example(without test)
add_action('woof_before_draw_filter',function( $key, $shortcode_atts){
$cat_slugs =array ("allestimenti","all_slugs", 'all_slags');
$cat_ids = array(57, 58, 59);
$really_curr_tax = false;
if(isset($_GET['really_curr_tax']))
foreach($cat_ids as $id){
$cat_query =$id ."-product_cat";
if( $_GET['really_curr_tax'] == $cat_query){
$really_curr_tax = true;
}
}
if($key == 'pa_segmento-lcv' && ( ! is_product_category($cat_slugs) || $really_curr_tax )){
echo"<p>TIPOLOGIA MEZZO</p>";
}
},20,2);
Quote from Carlo on December 7, 2021, 16:59Thank you it's working!
Thank you it's working!