[Resolved] excluding terms from taxonomy using wpv-filter-query
This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Tell us what you are trying to do? im using the following code to filter my query but for some reason it results in an HTTP ERROR 500
do you have any idea what could be causing this?
add_filter( 'wpv_filter_query', 'exclude_terms_func', 10, 3 );
function exclude_terms_func($query, $setting, $views_ID)
{
if($views_ID == 18218) // your view id
{
$query['tax_query'][] = array(
'taxonomy' => 'wpv-category', // taxonomy name
'field' => 'slug',
'terms' => array( 'articles-and-letters', 'blog', 'featured-blog', 'cubik-training', 'cubik-sub', 'exclude-from-homepage', 'featured-news', 'newsletter', 'profiles-and-interviews', 'speeches', 'uncategorized', 'working-in-parliament' ), // term slug for exclude
'operator' => 'NOT IN'
);
$query['tax_query']['relation'] = 'AND';
}
return $query;
}
Is there any documentation that you are following?
Hello. Thank you for contacting the Toolset support.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
I know I help you with your previous ticket but with the previous ticket FTP access was not required, I just changed the view's filter so I didnt use FTP access with previous support ticket.
With this ticket, I need to work with your funcitons.php in order to check the code you added but unfortunately still I'm not able to login to FTP using access details you shared. Maybe you can create another FTP user account and share details with me.
The FTP access still not working for me, then I've asked one of my college to check the FTP access you shared and for him as well FTP access is not working.
Could you please check with your hosting authority why we are not able to connect to it.
Here is connection log:
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode (104,207,134,83,34,197).
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing