Home › Forums › Pro Support › Two WPSP on singe page Pagination issue
Tagged: offset pagination issue
- This topic has 18 replies, 2 voices, and was last updated 5 years, 4 months ago by
dave-smith.
-
AuthorPosts
-
May 9, 2018 at 8:59 pm #4479
dave-smith
ParticipantI 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.
DaveMay 9, 2018 at 9:13 pm #4482Tom
KeymasterHi there,
Give this CSS a try:
.paged #wpsp-1084 { display: none; }
May 9, 2018 at 9:32 pm #4483dave-smith
ParticipantTom,
That got rid of 1084, but 1080 still is showing the first page posts.
May 10, 2018 at 11:25 am #4492dave-smith
ParticipantTrying 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
May 10, 2018 at 9:14 pm #4498Tom
KeymasterWhat 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.
May 10, 2018 at 9:33 pm #4499dave-smith
ParticipantI 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
May 10, 2018 at 9:41 pm #4500dave-smith
ParticipantTom,
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
May 10, 2018 at 9:47 pm #4501dave-smith
ParticipantI 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.
May 10, 2018 at 10:04 pm #4502dave-smith
ParticipantLast one,
Offset of 1 with only a single loop on the page the pagination is broken. It repeats the first page over and over.
May 11, 2018 at 9:04 pm #4508Tom
KeymasterYou 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; }
May 12, 2018 at 10:50 am #4524dave-smith
ParticipantI 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?
May 12, 2018 at 8:57 pm #4527Tom
KeymasterWhat happens if you keep the code as 1200 x 400?
May 12, 2018 at 9:18 pm #4530dave-smith
ParticipantIf 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
May 13, 2018 at 9:44 pm #4544Tom
KeymasterJust 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!
May 13, 2018 at 10:45 pm #4546dave-smith
ParticipantThe 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.
-
AuthorPosts
- You must be logged in to reply to this topic.