Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hi,

    Please, follow the steps below:

    1. Open the searchinplace.clss.php file, located in “/wp-content/plugins/search-in-place-advanced/php/searchinplace.clss.php”, in the text editor your choice.

    2. Go to the snippet of code:

    // Get the attachments that include the search terms
    $newlimit = $limit-count($posts);
    if($newlimit > 0){
    $posts = array_merge($posts, $wpdb->get_results(“SELECT * FROM $wpdb->posts WHERE post_type=’attachment’ AND post_status=’inherit’ AND (post_title LIKE ‘$s%’ OR post_content LIKE ‘$s%’ OR post_name LIKE ‘$s%’ OR post_excerpt LIKE ‘$s%’) AND post_parent IN (SELECT ID FROM $wpdb->posts WHERE post_status=’publish’) LIMIT $newlimit”, OBJECT));
    }

    Around the line number 268, and delete it.

    Best regards.

    Thread Starter erceth

    (@erceth)

    It worked! THANKS!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Only search custom post type’ is closed to new replies.