Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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/

    #1470310

    Hey 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,
    Ismael

    #1470322

    Thank 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 3 weeks, 1 day ago by Jason.
    #1470325

    Hi!

    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,
    Ismael

    #1470326

    That 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/

    #1470382

    Hi,

    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,
    Ismael

    #1470436

    Thank 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/

    #1470528

    Hi,

    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,
    Ismael

    #1470775

    On 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?

    #1470817

    Hi,

    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,
    Ismael

    #1470853

    Thank 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.

    #1470879

    Hi,

    Great! Glad to know that this has been resolved. Please don’t hesitate to open another thread if you have more questions about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Where to turn on images on blog category pages’ is closed to new replies.