-
AuthorPosts
-
October 30, 2024 at 6:37 am #1470202
I am using a Masonry custom blog layout which works fine. However, when I select a category tag of one of the blog types I just get a listing of the blogs without the image.
I am having a hard time figuring out where to control the images for these pages. See example here:
https://galaxypress.com/category/horror/October 31, 2024 at 4:45 am #1470310Hey Jason,
Thank you for the inquiry.
You can adjust the layout of the archive pages in the Enfold > Blog Layout > Blog Layout settings. You can also use this filter in the functions.php file:
add_filter('avf_blog_style','avf_blog_style_mod', 10, 2); function avf_blog_style_mod($layout, $context){ if($context == 'archive') $layout = 'blog-grid'; return $layout; }
Best regards,
IsmaelOctober 31, 2024 at 6:03 am #1470322Thank you for the code. I have added this and see the images, but the odd thing is that they are all different sizes.
See link here:https://galaxypress.com/category/horror/
Any idea why these would be different sizes? They are all the same aspect ratio and when you see them on the main page they look fine as you can see here:
Specifically, if you look at the one with the skeletons they look fine on the main page, but on the archive page the image size is different. When you scroll down on the archive page you will see others that are different sizes.
As a note I looked on my other site using Enfold and found a similar problem with the image size is different here but okay on the main blog pages, see this link for an example:
https://writersofthefuture.com/category/author-spotlight/
- This reply was modified 1 month, 3 weeks ago by Jason.
October 31, 2024 at 6:26 am #1470325Hi!
Thank you for the update.
Try to add this filter to adjust the thumbnail size of the featured images.
add_filter("avf_post_slider_args", function($atts, $context) { if ($context == "archive") { $atts['type'] = 'grid'; $atts['columns'] = 4; $atts['preview_mode'] = 'custom'; $atts['image_size'] = 'portfolio'; } return $atts; }, 10, 2);
Regards,
IsmaelOctober 31, 2024 at 6:30 am #1470326That code made it 4 columns instead of the prior 3 columns. It didn’t change the image size. See link:
https://galaxypress.com/category/horror/November 1, 2024 at 4:40 am #1470382Hi,
Thank you for the update.
What happens when you set the $atts[‘image_size’] value from “portfolio” to “full”?
$atts['image_size'] = 'full';
You can change the column count by adjusting this line:
$atts['columns'] = 4;
Best regards,
IsmaelNovember 1, 2024 at 5:18 pm #1470436Thank you very much! This fixed both making it into 3 columns as well as the image size by changing it to “full”.
On my other site, I would like to fix the image issue on the category page too. This is already 3 columns so not sure what part of the code would need to go into the functions file. See link:
https://writersofthefuture.com/category/news-press-releases/
November 4, 2024 at 4:43 am #1470528Hi,
Thank you for the update.
On my other site, I would like to fix the image issue on the category page too
You can use the same filter on the other site; just adjust the values as needed.
Best regards,
IsmaelNovember 6, 2024 at 6:16 pm #1470775On page https://writersofthefuture.com/category/news-press-releases/ I added the following code that I thought was the same and the images are still not consistent.
add_filter(‘avf_blog_style’,’avf_blog_style_mod’, 10, 2);
function avf_blog_style_mod($layout, $context){
if($context == ‘archive’) $layout = ‘blog-grid’;
return $layout;
}Maybe this is a slightly different style name on this page?
November 7, 2024 at 7:24 am #1470817Hi,
Thank you for the info.
Did you add the avf_post_slider_args filter?
add_filter("avf_post_slider_args", function($atts, $context) { if ($context == "archive") { $atts['type'] = 'grid'; $atts['columns'] = 4; $atts['preview_mode'] = 'custom'; $atts['image_size'] = 'full'; } return $atts; }, 10, 2);
Best regards,
IsmaelNovember 7, 2024 at 6:16 pm #1470853Thank you so much. I had put the wrong filter into the site. When I added this above code it fixed the image sizes so they are all now the correct size.
November 8, 2024 at 6:52 am #1470879 -
AuthorPosts
- The topic ‘Where to turn on images on blog category pages’ is closed to new replies.