Hello everyone,
I would like to change the category and tag archive pages to the style I use for my landing page. Is it possible to apply the blog grid layout to the archive pages?
I want the blog layout and the tag page to look the same. There is no thumbnail on the filtered page. How can I edit this?
Thank you!
Cheers, Jens
Hey Jens-abroad,
Thank you for your patience and for the login to your site, for the grid layout on your archive page and tag page I added this code to the end of your functions.php file in Appearance ▸ Editor:
add_filter('avf_blog_style','avia_change_archive_blog_layout', 10, 2);
function avia_change_archive_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;
}
so now the layout is grid with the images showing, but the css doesn’t match because the blog grid on your landing page is created by the plugin Gutenberg Blocks by Kadence Blocks
To have all of the grid styles match try building your landing page with the theme’s Advanced Layout Builder and use the blog element to show the posts.
Also, I recommend using a Child Theme and moving the functions.php code to the child theme so it will not be lost on your next theme update.
Best regards,
Mike