Title: elspethdick's Replies | WordPress.org

---

# elspethdick

  [  ](https://wordpress.org/support/users/elspethdick/)

 *   [Profile](https://wordpress.org/support/users/elspethdick/)
 *   [Topics Started](https://wordpress.org/support/users/elspethdick/topics/)
 *   [Replies Created](https://wordpress.org/support/users/elspethdick/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/elspethdick/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/elspethdick/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/elspethdick/engagements/)
 *   [Favorites](https://wordpress.org/support/users/elspethdick/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Query not working within the relevanssi_modify_wp_query filter](https://wordpress.org/support/topic/query-not-working-within-the-relevanssi_modify_wp_query-filter/)
 *  Thread Starter [elspethdick](https://wordpress.org/support/users/elspethdick/)
 * (@elspethdick)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/query-not-working-within-the-relevanssi_modify_wp_query-filter/#post-6623212)
 * I’ll close as resolved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Query not working within the relevanssi_modify_wp_query filter](https://wordpress.org/support/topic/query-not-working-within-the-relevanssi_modify_wp_query-filter/)
 *  Thread Starter [elspethdick](https://wordpress.org/support/users/elspethdick/)
 * (@elspethdick)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/query-not-working-within-the-relevanssi_modify_wp_query-filter/#post-6623211)
 * Thnaks Mikko!
    Will do 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Query not working within the relevanssi_modify_wp_query filter](https://wordpress.org/support/topic/query-not-working-within-the-relevanssi_modify_wp_query-filter/)
 *  Thread Starter [elspethdick](https://wordpress.org/support/users/elspethdick/)
 * (@elspethdick)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/query-not-working-within-the-relevanssi_modify_wp_query-filter/#post-6623111)
 * Hey,
    Thanks for your reply!
 * So my site has two custom post types, ‘books’ and ‘authors’.
 * There is a search page for finding books and it has a variety of custom fields
   to search by… title, ISBN number, author first name, author last name. The author
   first and last name fields actually belong to the ‘author’ post type. The ‘book’
   post type has an author field that contains ‘author’ post IDs.
    Basically I have
   to search for author posts by first and/or last name and get the post IDs of 
   the matched authors, then add to the $wp_query that the author field in the book
   post must contain one of the IDs found in the previous query. The outcome is 
   being able to add the author condition to the $wp_query: $wp_query->query_vars[‘
   meta_query’][] = array( ‘key’ => ‘author’, ‘value’ => {…array containing author
   post IDs…}, ‘compare’ => ‘IN’, );
 * However, I have found that if I perform any query at all within the relevanssi_modify_wp_query
   filter, I get a segmentation fault… perhaps an infinite loop due to the nested
   queries?
 * Here is a simple example that causes an error:
    function customize_query($wp_query){
   $args = array(‘post_type’ => ‘author’, ‘posts_per_page’ => -1); $query = new 
   WP_Query($args); }
 * Thanks so much for your help, I am lost!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Multi Image Metabox] Insert/add images from Media Library issue](https://wordpress.org/support/topic/insertadd-images-from-media-library-issue/)
 *  [elspethdick](https://wordpress.org/support/users/elspethdick/)
 * (@elspethdick)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/insertadd-images-from-media-library-issue/#post-5928422)
 * Hello,
    I have this problem too! I know it was working at some stage, I went 
   back into a post to edit the pictures and the ‘Insert to post’ has disappeared!
 * Can anyone help?

Viewing 4 replies - 1 through 4 (of 4 total)