Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #322649

    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 ?

    #323486

    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

    • This reply was modified 10 years, 3 months ago by Josue.
    #323559

    I tried this one before and it’s not working…

    #324114

    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

    #324117

    Thanks Ismael, it’s working :)

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Display thumbnails on archive pages (Tag+Category) when using Adv. blog layout’ is closed to new replies.