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

    (@codepeople)

    Hi,

    You only should to edit the searchinplace.clss.php file (located in “/wp-content/plugins/search-in-place/php/searchinplace.clss.php”) commenting the line of code number 58:

    // $posts = array_merge($wp_query->posts, $wpdb->get_results(“SELECT * FROM …

    Thread Starter Li-An

    (@li-an)

    Thank you.

    josjee

    (@josjee)

    I removed the complete line but this does not seem to help?
    -JosJee

    Plugin Author codepeople

    (@codepeople)

    Hi,

    You should be sure to comment the line of code mentioned in the previous entry, and modify the snippet of code:

    $query->set(‘post_type’, array(‘post’, ‘page’, ‘attachment’));

    like follow:

    $query->set(‘post_type’, array(‘post’, ‘page’));

    Is it possible to make this a selectable option in a future iteration of the plugin so every time I update the plugin I don’t have to find where to comment out?

    Plugin Author codepeople

    (@codepeople)

    Hi,

    In the current version of plugin, these post_types are selected by default. I’ll consider your suggestion in the next version of plugin to make these post_types optional and selectable from the settings page of plugin.

    Thread Starter Li-An

    (@li-an)

    I did the changes… and nothing is showing anymore in search results.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    I’ll need the access to your WordPress to check the edited code.

    For send me sensitive information, use my support page in:

    https://wordpress.dwbooster.com/support

    Best regards.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    I’m sorry, after comment the line of code:

    // $posts = array_merge($wp_query->posts, $wpdb->get_results(“SELECT * FROM …

    you should paste below the snippet of code:

    $posts = $wp_query->posts;

    Best regards.

    Thread Starter Li-An

    (@li-an)

    OK, thank you.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘No attachment ?’ is closed to new replies.