Support » Plugins » [Plugin: Search Everything] can this exclude attachments from search?

  • sjc

    (@stevielovegun)


    I’m looking for a way of excluding all attachments (files, images) from search results. Looking at this plugin I have a couple of questions

    Looking at the options page I’m unclear about

    1. Is the default setting for all of the options No? The choices I see are blank or Yes
    2. Can use this plugin to make all searches exclude all attachments? I see I can choose yes to ‘search every attachment’ but is there a no, don’t search any attachments?
    3. Ta.

    http://wordpress.org/extend/plugins/search-everything/

Viewing 2 replies - 1 through 2 (of 2 total)
  • fmachs

    (@fmachs)

    I am looking for a way to exclude attachments from the metadata search.
    Any ideas?

    fmachs

    (@fmachs)

    nvm.

    Found line 520:
    $search = " OR ({$search}) ";

    And changed to:
    $search = " OR ({$search}) AND $wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'attachment' ";

    That solved my problem. Now the search works for custom fields and isn’t duplicating entries.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Search Everything] can this exclude attachments from search?’ is closed to new replies.