Tagged: custom archive page
Thank you for this wonderfull theme. I’m using it on 2 sites and it looks great.
I tried to find how to modify the layout of archive pages (categories). I chose grid layout for my blog layout and it works well, but I can’t change the number of posts displayed on a page or the number of columns.
When I chose a custom layout for my blog, it works well for that page only, but not for the category archive pages.There the posts are not displayed in a grid anymore. Any suggestions?
Regards, Frits
Hey Frits,
In the blog post element did you try changing the column and post number?
If you still have any issue please deactivate all the active plugins and let us know if it makes any difference.
Best regards,
Vinay
Hi Vinay,
Sure and that works fine on the blog page, but not on the archive pages. As soon as I select any of the category pages, I have either a list of posts (when I habe a custom blog page defined) or a grid of 3 columns and max 10 posts.
Regards, Frits
Hi,
Please add this in the functions.php file.
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;
}
Best regards,
Ismael
Hi Ismael,
Added this code to the functions.php and after saving, I get an error 500. I’m not a programmer, so I haven’t got a clue where the fault lies. Luckily, I know how to restore the functions.php
Regards,
Frits
Hi,
Did you copy the code from your email? Please copy it directly from the forum. Or post the login details in the private field and we’ll add it in your installation.
Best regards,
Ismael