I would like to delete the “in” before the category name and put the category right below the product title in the search results page.
Where can I edit this?
Website: https://ak-fundus.ch/?s=berge
Hey netzhautflimmern,
Thank you for the inquiry.
The category info is included in the search results template by default. Did you modify the includes > loop-search.php file? In that file, you’ll find this code.
$taxonomies = get_object_taxonomies(get_post_type($the_id));
$cats = '';
$excluded_taxonomies = array_merge( get_taxonomies( array( 'public' => false ) ), array('post_tag','post_format') );
$excluded_taxonomies = apply_filters('avf_exclude_taxonomies', $excluded_taxonomies, get_post_type($the_id), $the_id);
if(!empty($taxonomies))
{
foreach($taxonomies as $taxonomy)
{
if(!in_array($taxonomy, $excluded_taxonomies))
{
$cats .= get_the_term_list($the_id, $taxonomy, '', ', ','').' ';
}
}
}
if(!empty($cats))
{
echo "<span class='text-sep'>/</span>";
echo '<span class="blog-categories minor-meta">'.__('in','avia_framework')." ";
echo $cats;
echo '</span>';
}
That block of code renders the category info.
Best regards,
Ismael