• Resolved beanslel

    (@beanslel)


    Love this plugin, it works perfect. I have just one request: is it possible to hide the “All” category when displaying the FAQ in filterable-toggle mode? I would like to only display the defined categories. I have too many FAQ items that the “All” page is way too big and unusable, so I prefer to hide it. I found the place in the code where the category titles and FAQs are being drawn, but I can’t figure out an easy way to hide the all category. Any pointers? Is there an easy way to do this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Beanslel,

    You need to put some CSS and JS code to achieve your required scenario.

    Pur the following CSS code in ‘Appearance > Customize > Additional CSS’ to hide ‘All’ filter.

    .qe-faqs-filters-container li:first-child {
    display: none;
    }

    Now we need to make the very next filter active using jQuery. You need to put the following js code in your theme JS file or use any plugin to add quick JS in your WordPress.

    var target = $(‘.qe-faqs-filters-container .qe-faqs-filter:eq(1)’);
    target.parent(‘li’).addClass(‘active’).siblings().removeClass(‘active’);
    var allFAQs = $( ‘.qe-faq-toggle’),
    filterSelector = target.attr( ‘data-filter’ );
    allFAQs.not( filterSelector ).hide().end().filter( filterSelector ).show();

    Let me know if that helps.

    Best Regards

    Thread Starter beanslel

    (@beanslel)

    Hi Hassan,

    Thanks for your quick reply, your suggestion works perfectly, many thanks!

    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide “All” category’ is closed to new replies.