Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1209143

    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

    #1210426

    Hey Tina,

    The ‘blog-grid’ already has a 3 column layout.
    Here is the code:
    Image 2020-05-06 at 19.58.09.png

    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

    #1210481

    Hi Victoria
    Awesome, that really helps!
    Thanks
    Tina

    #1210495

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘how to make changes in for example the archive.php file with a child theme’ is closed to new replies.