Hey, I have a question regarding this post: https://kriesi.at/support/topic/how-to-adjust-blog-posts-grid-3-column-to-2-column-layout-for-category-and-tag/ is there a better way to get the 2 column blog design than copying the archive PHP into the enfold child theme and changing the 3 to a 2. Or maybe you can add that to your future fixes, please?
Thanks so much
Martina
Hey Tina,
The ‘blog-grid’ already has a 3 column layout.
Here is the code:
So you don’t need to modify the archive.php file. YOu just need to add this to your functions.php:
add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2);
function avia_change_category_blog_layout($layout, $context){
if($context == 'archive') $layout = 'blog-grid';
return $layout;
}
add_filter('avf_blog_style','avia_change_tag_blog_layout', 10, 2);
function avia_change_tag_blog_layout($layout, $context){
if($context == 'tag') $layout = 'blog-grid';
return $layout;
}
Best regards,
Victoria
Hi Victoria
Awesome, that really helps!
Thanks
Tina
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon