Streaming live at 10am (PST)

Read more button increasing the limit of post displayed

Hello, and sorry if this is answered before, but I havevn’t found an answer to it.

So I have a news section (blog posts) that displays the latest 4 news articles, and underneath I have a button. So what I want is when the button is pressed, another 4 articles will be displayed, and clicked again another 4 is displayed. And so on. You get the idea.

I figured I have to add some JS-code, but I don’t know how to target the items that’s being limited, to increase the limit.

Here is my public share link: LINK
(how to access public share link)

What we can do, is remove the limit. Then on page load with JS, hide all except the first four. All items will still be loaded, but we can control how many are displayed on a button click.

Okey, and it’s still gonna load X-amount of post per button click? Beacuse I don’t want to show every post ever posted with one click.

@samliew How would you recommend setting up the JS?
Do you have a code snippet we could have a look at? I think this is something that might help a lot of people out :slight_smile:

One concern I have though is that having them all load at one time might cause the side to be heavy to load.

Hi @torkelv! I’m trying to solve the same problem as yours. Did you manage to find a solution or workaround?

Take a look at this amazing library: