The access details worked, thank you.
I've downloaded the website's clone and will be running some testing on this.
Will share the findings, as soon as this testing completes. Thank you for your patience.
Thank you for waiting.
During troubleshooting on your website's clone, I was able to make the following custom code work, without any errors:
//eliminar equipos médicos de resultados de búsquedas en página filtros
function custom_post_type_archive_autoclaves( $query ) {
if ( ! is_admin() && is_post_type_archive('autoclaves') ) {
$taxquery = array(
array(
'taxonomy' => 'series-de-autoclaves-taxonomia',
'field' => 'term_id',
'terms' => array( 96 ),
'operator'=> 'NOT IN'
)
);
$query->set( 'tax_query', $taxquery );
}
}
add_action( 'pre_get_posts', 'custom_post_type_archive_autoclaves' );
Note: the taxonomy slug 'series-de-autoclaves-taxonomia' is used in the code and not the slug of the target term ('autoclaves-medicas').
Thank you Waqar.
I have added the code you have kindly provided me, but the page still doesn't work.
I f I understand correctly, in your clone works correctly, is that right?
I don't know what happened in mine, but since I have added the first version of the code, the search stopped working in general, and it still does not work even after removing the code.
Do you have any idea why this happens or how to solve it?
Hi,
my archive page is still broken, with or without the extra code in the functions.php
Adding the code what the thing that broke the page, but I don't know why that happened or how to fix it.
Any idea on how to solve it?
Thank you in advance
Thank you for waiting, as we had a busy forum queue over the weekend.
I've checked the archive ( hidden link ) and the custom code is working as expected to exclude the posts with the term 'Autoclaves médicas'.
( without the code there are 22 results, while with the code, there are 12 )
I've created a separate ticket for your report about the search not working and will follow up on that shortly.
( ref: https://toolset.com/forums/topic/split-archive-page-search-broken/ )
You're welcome to mark this ticket as resolved and start a new one, for each new question or concern.
Thank you very much for your support Waqar, I am closing the ticket