We're merging with GenerateBlocks! Learn more here.

[Support request] Two WPSP on singe page Pagination issue

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Two WPSP on singe page Pagination issue

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #4479
    dave-smith
    Participant

    I setup a custom blog page with two different WPSPs on the page. The first one only shows the latest post, single column, image size is 1200px X 300px.

    The second WPSP shows all the rest of the blog posts in 2 columns, images sizes 600px x 200px offset by 1 post so the current post isn’t displayed twice.

    Pagination is turned on. The issue, when you click to go to the second page. The first page repeats, and continues to repeat on all pagination pages.

    If I remove the offset, then the pagination works as it is supposed to.

    Is this a bug? Is there a workaround?

    I’ll leave everything in place till I hear back.

    Site url: https://kerriedroban.com/dev/kerries-blog/

    Thank for your help.
    Dave

    #4482
    Tom
    Keymaster

    Hi there,

    Give this CSS a try:

    .paged #wpsp-1084 {
        display: none;
    }
    #4483
    dave-smith
    Participant

    Tom,

    That got rid of 1084, but 1080 still is showing the first page posts.

    #4492
    dave-smith
    Participant

    Trying to kick this back to the top. Display none didn’t resolve the issue stated above. It appears the issues lies in the offset 1 for the 1080 instance of WPSP. Remove that and it works. I’d still prefer to not show the first post twice, Can someone take a look at this again today.

    Thanks. I’m loving WPSP, hope we can get this resolved.

    Dave

    #4498
    Tom
    Keymaster

    What if you only used one WPSP list, but set it to have a featured post? That way the layout would be the same, and you could ditch the offset.

    Whenever you have two different loops on one page, you’re going to run into pagination issues unfortunately.

    #4499
    dave-smith
    Participant

    I tried that, but the image size is set to 600px because there are two columns. That means the featured post is also 600px and small since featured is in a single column. If Featured post once checked, displayed an image size option to make the featured post bigger, that would be perfect. Then, only a single loop, and a large hero image.

    The way I have it now, it will run the two loops fine as along as there is no offset.

    But I’m with you, I don’t like running two loops on a single page. Preference would be to add the image size option to featured post and run a single loop.

    Thanks Tom

    #4500
    dave-smith
    Participant

    Tom,

    I set the image size to be 1200 x 400 instead of 600 x 200. Then checked featured post. And 2 columns. This in effect made the featured post 1200 x 400 and the rest 600 x 200.

    Visually it works great. My question at this point, is does the larger image size setting increase the overall size of the page or is this an effective way to accomplish what I was after with out making any changes to the plugin.

    Dave

    #4501
    dave-smith
    Participant

    I ran the page through pingdom with both settings. 1200 x 400 results in a page 1.2 meg 600 x 200 715.6kb

    This would seem to indicate it would be advantageous to have an image setting for the featured post and a smaller size for all the other posts.

    #4502
    dave-smith
    Participant

    Last one,

    Offset of 1 with only a single loop on the page the pagination is broken. It repeats the first page over and over.

    #4508
    Tom
    Keymaster

    You could set the smaller image size for the columns, then use a function to set a larger image size for the featured post:

    add_filter( 'wpsp_image_attributes', 'tu_featured_column_image' );
    function tu_featured_column_image( $atts ) {
        // Set up our conditional
        if ( ! is_singular() && in_array( 'featured-column', get_post_class() ) ) {
            $atts[ 'width' ] = 1200;
            $atts[ 'height' ] = 400;
            $atts[ 'crop' ] = true;
        }
    
        // Return our options
        return $atts;
    }
    #4524
    dave-smith
    Participant

    I added this to a snippet, and changed the image size to 600 x 200 but the code isn’t making the featured image 1200 x 400. It is 600 x 200.

    Is there someplace else I need to add the code instead of in a code snippet?

    #4527
    Tom
    Keymaster

    What happens if you keep the code as 1200 x 400?

    #4530
    dave-smith
    Participant

    If I keep it 1200 x 400 the featured image displays 1200 x 400 and the rest of the images in two columns display 600 x 200, But the page size is 1.2meg with that setting, and 7.15kb when set to 600 x 200.

    I’d like to keep the page size smaller and display the featured image at 1200 x 400.

    I don’t know why the code you sent doesn’t work. I was really hoping this would be a solution.

    Thanks Tom,

    FYI, there is still a bug with the offset setting. put in anything in that field and the first page repeats instead of paginating. I can submit a separate ticket for that issue if you want.

    Enjoy the rest of your weekend,

    Dave

    #4544
    Tom
    Keymaster

    Just to confirm, your image settings in the actual list are set to 600 x 200, correct? The function I provided should simply overwrite the featured post images only, but will leave the rest of the images.

    A separate ticket for the offset issue would be great.

    Thanks!

    #4546
    dave-smith
    Participant

    The setting are now 600 x 200. The code is in a snippet. It is not working. All the images including the featured image are 600 x 200.

    https://kerriedroban.com/dev/kerries-blog/

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.