CMS Development

RyanPatterson
Colaborador | Partner nivel Platinum
Colaborador | Partner nivel Platinum

Show different number of posts on paginated pages

resolver

I'm about to start building a blog and came across something in the design that i'm not sure if I can do in Hubspot. 

 

The design shows 7 posts on the main listing page (1 featured/most recent) with 6 in a 3 column grid below. 

 

However, on the paginated pages, it has 15 posts (in 3 column grid). 

 

So I'm wondering, is there a way to specify that you want 7 on the listing page, and then 15 on the paginated pages?

 

Any help would be greatly appreciated. 

0 Me gusta
1 Soluciones aceptada
stefen
Solución
Asesor destacado | Partner
Asesor destacado | Partner

Show different number of posts on paginated pages

resolver

@RyanPatterson it's possible you just have to be a bit creative. If you had the remaining 8 posts load inside of a template tag it wouldn't affect load time at all assuming that's what the concern was about.

Stefen Phelps, Community Champion, Kelp Web Developer

Ver la solución en mensaje original publicado

0 Me gusta
3 Respuestas 3
stefen
Asesor destacado | Partner
Asesor destacado | Partner

Show different number of posts on paginated pages

resolver

@RyanPatterson that's interesting. The way I would probably go about it is make 15 posts per page the default then use an if statement to check if you're on the first page and hide the remaining 8 posts.

 

The problem would be that you could never get to those 8 posts since the next page would only be posts 16 through 30.

 

So, to fix that you could add a "fake" next page button to the first page that unhides those 8 posts when clicked and then reveals the real pagination buttons after that.

Stefen Phelps, Community Champion, Kelp Web Developer
0 Me gusta
RyanPatterson
Colaborador | Partner nivel Platinum
Colaborador | Partner nivel Platinum

Show different number of posts on paginated pages

resolver

@stefen  Thank you for your reply. Unfortunately, I presented a similar option that was shot down. I'm still hoping to find a solution but they said they would rather have the last row on paginated pages only have one post item rather than hiding any posts. They weren't too keen on having all posts load on the first page and having a load more button either. 

 

Hopefully someone knows for sure whether or not it is possible. I'm still relatively new to HubL, so are not sure what all is and is not possible. 

0 Me gusta
stefen
Solución
Asesor destacado | Partner
Asesor destacado | Partner

Show different number of posts on paginated pages

resolver

@RyanPatterson it's possible you just have to be a bit creative. If you had the remaining 8 posts load inside of a template tag it wouldn't affect load time at all assuming that's what the concern was about.

Stefen Phelps, Community Champion, Kelp Web Developer
0 Me gusta