elspethdick
Forum Replies Created
-
I’ll close as resolved.
Thnaks Mikko!
Will do 🙂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
In reply to: [Multi Image Metabox] Insert/add images from Media Library issueHello,
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?