Hello,
I would like to display thumbnails on archive pages while using the Advanced blog layout feature.
It’s working for categories using following code found :
add_filter('avf_blog_style','avia_change_archive_blog_layout', 10, 2);
function avia_change_archive_blog_layout($layout, $context){
if($context == 'archive') $layout = 'single-small';
return $layout;
}
How to to the same with TAG archives ?
Hi Ronan!
Try using this code instead:
add_filter('avf_blog_style','avia_change_archive_blog_layout', 10, 2);
function avia_change_archive_blog_layout($layout, $context){
if(($context == 'archive') || ($context == 'tag')){
$layout = 'single-small';
}
return $layout;
}
Regards,
Josue
I tried this one before and it’s not working…
Hi!
Please edit tag.php, find this code on line 38:
$blog_layout = apply_filters('avf_blog_style', avia_get_option('blog_style','multi-big'), 'tag');
if($blog_layout == 'blog-grid')
Replace it with:
$avia_config['blog_style'] = apply_filters('avf_blog_style', avia_get_option('blog_style','multi-big'), 'tag');
if($avia_config['blog_style'] == 'blog-grid')
You can now use the filter above.
Cheers!
Ismael
Thanks Ismael, it’s working :)