Forums Forums Search & Filter Pro Category description

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #265015

    Hi

    I am trying to get the category description from the active category.

    I found this topic: https://support.searchandfilter.com/forums/topic/category-description/, but I does not seem to work for me or I don’t completely understand what the solution is.

    Is there any way to do this?

    Thanks!

    Trevor
    #265041

    What code are you using? And where are you putting this code?

    Anonymous
    #265049

    Right now I am not using any code since I don’t really understand the other topic.

    The thing I want to achieve is to get the descriptions from all categories. I am trying to add a short description for every filter on my page through a tooltip, so I need to get all the category descriptions with for example a data attribute with the category name.

    Anonymous
    #265096

    My last message wasn’t very clear so here is a better explaination. It would be useful for us to ‘change’ the filter section, For example if we can add the category description directly within the filter form.

    <li class="sf-level-1 sf-item-28" data-sf-count="0" data-sf-depth="1">
        <input class="sf-input-checkbox" type="checkbox" value="meubilair" name="_sft_product_cat[]" id="sf-input-e1580d486231b2d2cc5c9c1e1477f2d9">
        <label class="sf-label-checkbox" for="sf-input-e1580d486231b2d2cc5c9c1e1477f2d9">Meubilair</label>
        <div>CATEGORY DESCRIPTION HERE</div>
    </li>

    So as shown above I want to get the description in an extra div for every category or taxonomy.

    Is this possible?

    Trevor
    #265164

    If it were possible, I do not know how you would do this, and I suspect it would break our filter, as the filter relies on the form HTML structure to work, and adding a div like that could break it.

    Fetching the description would need PHP, but adding it in to the form would need JavaScript, and I cannot see that working, sorry.

Viewing 5 posts - 1 through 5 (of 5 total)