WPFTS Pro Main Site WPFTS Community Forum
    • Recent
    • Tags
    • Popular
    • Register
    • Login
    Get WPFTS Pro today with 25% discount!

    [Solved] WP Knowledgebase publications (kbe_knowledgebase) do not show in search results

    Scheduled Pinned Locked Moved Recipes and Known Solutions
    knowledgebasekbe
    1 Posts 1 Posters 881 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EpsilonAdminE Offline
      EpsilonAdmin
      last edited by EpsilonAdmin

      There is a nice plugin that allows you to create your own knowledgebase using Wordpress.
      But unfortunately, it's authors decided to disable search for all articles with its custom post_type (which is kbe_knowledgebase). As a result, WP Knowledgebase articles do not show in WPFTS search results. However, these articles are indexed well and you can see them while test the search in Sandbox.

      To fix this, we have to re-enable the search for Knowledgebase posts.

      Please put this small code snippet to your functions.php file in the main theme root.

      add_action( 'registered_post_type', function( $post_type, $args ) 
      {
          // Make sure we're only editing the post type we want
          if ( 'kbe_knowledgebase' != $post_type )
              return;
      
          $args->exclude_from_search = false;
      
          // Modify post type object
          global $wp_post_types;
          $wp_post_types[$post_type] = $args;
      }, 10, 2 ); 
      

      What does it do? Pretty simple. The flag exclude_from_search was set to true inside the WP Knowledgebase plugin and thus, these custom posts are not included to search.

      This simple snippet fixes this.

      Have fun!

      https://e-wm.org

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post

      Suggested Topics

      • EpsilonAdminE

        [Solved] EduMall theme does not show Smart Excerpts and broken the search results page

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions
        1
        0 Votes
        1 Posts
        683 Views
        No one has replied
      • EpsilonAdminE

        [Solved] Indexing and Search files by content in BuddyDrive

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions buddydrive file search
        1
        0 Votes
        1 Posts
        935 Views
        No one has replied
      • EpsilonAdminE

        [Solved] Does not show Smart Excerpt with Total Theme

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions smart excerpt total theme theme
        1
        0 Votes
        1 Posts
        821 Views
        No one has replied
      • EpsilonAdminE

        How to search a post by the attached PDF file

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions acf attachment meta pdf
        1
        0 Votes
        1 Posts
        1k Views
        No one has replied
      • EpsilonAdminE

        [Solved] Incompatibility with Flatbase theme

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions flatbase excerpt theme
        1
        0 Votes
        1 Posts
        953 Views
        No one has replied

      Additional Resources

      • My Account
      • Buy WPFTS Pro
      • Community Forum
      • Affiliate Program
      • Privacy Policy
      • Terms & Conditions
      • Contact Us
      • Coupon Partner

      Be the first to read the news!

      We are always improving our products, adding new functions and fixes. Subscribe now to be the first to get the updates and stay informed about our sales! We are not spammy. Seriously.

      Join Us Now!

      We are a professional IT-team. Many of us have been working in a Web IT field for more than 10 years. Our advanced experience of software development has been employed in the creation of the WordPress FullText Search plugin. All solutions implemented into the plugin have been used for 5 or more years in over 60 different web-projects.

      We are looking forward to your comments, requests and suggestions in relation to the current plugin and future updates.

      ewm-logo-450

      The forum powered by NodeBB | Contributors