Viewing 1 replies (of 1 total)
  • Plugin Author joe_bopper

    (@joe_bopper)

    Hi Daniel,

    I can’t remember whether that is WordPress default behaviour or not. If not, then you have some code which is globally limiting searches to post post type – could be in your theme or in any of your plugins.

    It could work to simply define the allowed post types in the search form, like this:

    do_action( 'bop_nav_search_hidden_inputs', function( $item, $depth, $args ){
      ?>
      <input type="hidden" name="post_type[]" value="my-post-type">
      <input type="hidden" name="post_type[]" value="my-other-post-type">
      <!-- etc. -->
      <?php
    } );

    However, these choices could be overwritten by the globally changing code I was referring to. In which case, find it and remove it, replace it, or add code to cancel it out (depending on which is best – if it’s in a third party plugin, you don’t want to directly overwrite any code as it may be lost in an update).

    Here’s a link that may be helpful: https://wptheming.com/2015/11/limit-search-form-to-specific-post-types/

    Hope this helps.

    Cheers,
    Joe

    P.S. Notably, these aren’t issues actually within the remit of this plugin, so I’m marking this as resolved. Don’t be deterred from asking for any further clarification though.

Viewing 1 replies (of 1 total)
  • The topic ‘Can you search posts and pages?’ is closed to new replies.