• Resolved Andrew MAGIK

    (@magikru)


    Hi, is there some way to remove unnecessary   from the woof_list_checkbox?

    Now I have:

    <ul class="woof_list woof_list_checkbox">
      <li>
        <input type="checkbox" disabled="" id="woof_40_566d4d0312793" class="woof_checkbox_term" data-tax="product_tag" name="Name" value="40">
        &nbsp;
        <label for="woof_40_566d4d0312793">Name <span>(0)</span></label>
        <input type="hidden" value="Name" class="woof_n_product_tag_barbie">
      </li>
    </ul>

    But I need the same, but without &nbsp;, like:

    <ul class="woof_list woof_list_checkbox">
      <li>
        <input type="checkbox" disabled="" id="woof_40_566d4d0312793" class="woof_checkbox_term" data-tax="product_tag" name="Name" value="40">
        <label for="woof_40_566d4d0312793">Name <span>(0)</span></label>
        <input type="hidden" value="Name" class="woof_n_product_tag_barbie">
      </li>
    </ul>

    Temporary I can remove this using jquery:

    $('.woof li').each( function(){
       $(this).html($(this).html().replace(/&nbsp;/g, ''));
    });

    But this solution is not best, because widget jumps while page is loading. So I want to somehow remove this unnecessary space, using back-end hack, but not using front-end scripts.

    https://www.ads-software.com/plugins/woocommerce-products-filter/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author RealMag777

    (@realmag777)

    Hello

    Yes, here: wp-content\plugins\woocommerce-products-filter\views\html_types\checkbox.php

    Find it before: <?php echo $count_string ?></label>

    Thread Starter Andrew MAGIK

    (@magikru)

    It is not best idea, because when plugin will be updated – this changes will be lost.

    Plugin Author RealMag777

    (@realmag777)

    You asked – I suggested
    You can do it by CSS

    Thread Starter Andrew MAGIK

    (@magikru)

    Thank you. But I think would be nice if in the admin panel we will have some options to configure elements content. Or may be plugin will have some wordpress hooks for this? ??

    Plugin Author RealMag777

    (@realmag777)

    Hello

    Understood you, but if to start implementation such options – the plugin will be veeery overloaded with it, and it will be looks as monster ??

    You can easy add your CSS code in ‘Custom CSS code’ textarea …

    Thread Starter Andrew MAGIK

    (@magikru)

    From my point of view – add additional margin/padding for the element with CSS much more ease and logic than to remove unneeded space from html via styles. Specially when this plugin is using with custom styled checkboxes.

    Plugin Author RealMag777

    (@realmag777)

    Ok, I did smth middle, not by any options but by css styles for checkboxes and radios, and spaces of course removed

    .woof_checkbox_label{
        margin-left: 7px;
    }
    
    .woof_checkbox_count{
        margin-left: 3px;
    }
    
    .woof_radio_label{
        margin-left: 5px;
    }
    
    .woof_radio_count{
        margin-left: 2px;
    }

    Styles can be overloaded in css code textarea in the plugin settings page …

    Thread Starter Andrew MAGIK

    (@magikru)

    Sounds good! Thank you! ??

    Plugin Author RealMag777

    (@realmag777)

    Welcome ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to remove space (&nbsp) from the woof_list_checkbox’ is closed to new replies.