Yes, Thanks very much.
I see the child posts, how would I change this to see a list of unique parent post titles.
Also how would I search for phrases eg. "abdominal pain"
Thanks
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
Can you please send me admin as well as FTP access details.
I have set the next reply to private which means only you and I have access to it.
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
I tried to update the function.php file and for couple of time the FTP works and now I just cant connect to the FTP.
Looks like as I'm changing the file and upload it again server blocked me or not sure why its not allowed me to connect to FTP.
Can you please remove any blockages and then I will try to connect the FTP again.
Please can you try again.
Seems there were problems on the server but they seem to have resolved themselves
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Can you please check now. I can seen that child posts are grouped by parent.
I've added the following code to your current theme's functions.php file:
add_filter( 'wpv_filter_query_post_process', 'func_group_by_parent_post', 999, 3 );
function func_group_by_parent_post( $query, $view_settings, $view_id ) {
if ($view_id == 42582) {
$parent_ids = array();
if ( !empty( $query->posts ) ) {
$all_posts = $query->posts;
foreach($all_posts as $k=>$v):
$get_parent = toolset_get_related_post($v->ID,'plant-complaint');
if(!in_array($get_parent,$parent_ids)){
$parent_ids[$get_parent] = $get_parent;
}else{
unset($all_posts[$k]);
}
endforeach;
$query->posts = array_values($all_posts);
$query->found_posts = count($all_posts);
$query->post_count = count($all_posts);
}
}
return $query;
}
It was bit crazy issue but I managed to find solution. Can you please confirm you able to see now unique parents.
More info:
=> https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query_post_process
Thanks very much Minesh, looks good.
Is there a possibility of looking for phrases eg. "abdominal pain" - if it's enclosed in quotes?
Or tick a checkbox to find child posts where all the words appear, if that's easier
Thanks
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Relevanssi offers the settings under "Advanced indexing settings" => Apostrophes and quotes
=> hidden link
Its on Relevanssi and you will require to consult the Relevanssi about this. Glad to help you 🙂
My issue is resolved now. Thank you!