• Resolved Bernardo Rosa

    (@bernardogram)


    Hey,I’m using the plugin to list articles on this page but pagination is breaking on some pages.

    If you got to page 2 it will only display a single article and the footer breaks.

    Page 3 and 5 displays also displays wrong amount of artciles and break footers. Pages 4 and 6 appears to be working well.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Bernardo Rosa

    (@bernardogram)

    The bug is happening on the articles that have gifs as their display images.

    Plugin Author Tom

    (@edge22)

    It looks like our image resizer isn’t compatible with gifs.

    You’ll need to remove the size values from the image settings and use CSS to resize them instead, for now.

    Thread Starter Bernardo Rosa

    (@bernardogram)

    Well, the crazy thing is that gifs work fine on other blogs, like digitaliza/blog (check the post from november 16) and we really heaven’t done anything to fix it. It just turns the gifs into static images.

    How would I go about fixing the images size manually?

    Plugin Author Tom

    (@edge22)

    You could remove the width and height values from the WPSP settings, then use some CSS like this:

    .wp-show-posts-image img {
        width: 260px;
        height: 165px;
        object-fit: cover;
    }
    Thread Starter Bernardo Rosa

    (@bernardogram)

    Thanks, I solved by adding this to test if gif:

    $thumb_url_low = strtolower($image_url[0]);
    $is_gif = strpos($thumb_url_low, '.gif') == true;

    And then I do modify the part where the image is rendered:

    if(!$is_gif){
       if ( ! empty( $image_atts ) ) : ?>
    	<img src="<?php echo WPSP_Resize( $image_url[0], $image_atts[ 'width' ], $image_atts[ 'height' ], $image_atts[ 'crop' ], true, $image_atts[ 'upscale' ] ); ?>" alt="<?php esc_attr( the_title() ); ?>" itemprop="image" class="<?php echo $settings[ 'image_alignment' ]; ?>" />
      <?php else :the_post_thumbnail( apply_filters( 'wpsp_default_image_size', 'full' ), array( 'itemprop' => 'image' ) );
      endif;
    }else{
      the_post_thumbnail(  $size = [$settings[ 'image_width' ], $settings[ 
      'image_height' ]], $attr = '');					
    }
    • This reply was modified 7 years, 4 months ago by Bernardo Rosa.
    Plugin Author Tom

    (@edge22)

    That’s definitely one way to do it, but you’ll need to make those changes each time the plugin is updated.

    Any way we can extend pagination to 1-10 instead of 1-2?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Pagination is breaking’ is closed to new replies.