• Hi

    Is there a solution planned to make possible to search on specific page through all FAQs. Issue is, that I have for example a lot of questions and with that you can lose very fast the overview. A search field would be really helpful.

    Regards

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,
    I have the same problem
    you solved?

    Thread Starter 7kontinente

    (@7kontinente)

    Unfortunately not. 🙁 Didn‘t hear anything from the developers.

    Add the following function to the functions.php of your theme, if you want to search in posts, pages and faqs:

    function fb_search_filter($query) {
     if ( !$query->is_admin && $query->is_search) {
     $query->set('post_type', array('post', 'page', 'hrf_faq') );
     }
     return $query;
     }
     add_filter( 'pre_get_posts', 'fb_search_filter' );

    If you just want to search in the faqs change
    $query->set('post_type', array('post', 'page', 'hrf_faq') );
    to
    $query->set('post_type', array('hrf_faq') );

    Thread Starter 7kontinente

    (@7kontinente)

    Thank you, but that is not what I was searching for. With this code I automatically disable the regular search function.
    I would need like a search box above my FAQ which searchs only within this FAQ page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search function’ is closed to new replies.