• Resolved bethimc

    (@bethimc)


    We really like what we’re seeing with this plugin, but have some questions. This plugin will form the basis for a portion of the site, but it is important that the knowledge base be integrated with the entire site. So, two questions:

    The site wide search does not pick up any of the articles in the knowledge base. Is this something that will be in a future release, or should I look at possibly adding a custom post type to WordPress so it recognizes the kbe_knowledgebase type as something to search?

    The article tags: they do not appear to be searchable, which is important to my client. We also want them to display at the bottom of the article. Are those items we could modify?

    Thanks!

    https://wordpress.org/plugins/wp-knowledgebase/

Viewing 1 replies (of 1 total)
  • Plugin Contributor Maeve Lander

    (@enigmaweb)

    Re Site Wide search… yes, if you’re using the WordPress default search then you will need to tell it to include the kbe_knowledebase type in it’s search. The code should look something like this:

    function filter_search($query) {
        if ($query->is_search) {
        $query->set('post_type', array('post', 'kbe_knowledgebase'));
        };
        return $query;
    };
    add_filter('pre_get_posts', 'filter_search');

    Alternatively you could use a more advanced search plugin like Relevanssi or Search & Filter

    Re searchable tags…
    I am not sure on this one… The default wordpress search does not render search results based on tags. I did originally create the custom search for WPKB to search based on tags as well but it got rejected because of that when submitted it to the repo. Again, I’d say probably a more advanced search would be your best bet here.

    Displaying tags should be easy using the_terms()
    http://codex.wordpress.org/Function_Reference/the_terms

Viewing 1 replies (of 1 total)
  • The topic ‘Site wide search and tag search’ is closed to new replies.