I’m using this to disable default content in archive loop but I’m having an unwanted conflict in no results page
making that there’s the no content information
appearing.
Is there anything to be done here to avoid this code from disabling the default content on that page (no results page
)?
add_filter( 'generate_do_template_part', 'disable_default_content_in_archive_loop');
function disable_default_content_in_archive_loop ($do) {
if ( is_archive() || is_search()) {
return false;
}
return $do;
}
add_filter( 'get_search_form', 'custom_search_form', 100 );