Load More – Number of Items

Posted in: Newspaper
Post count: 8

How do I change the number of Items to show by the Load-More-Button?

Post count: 1291

Hi,

This is not an easy task, the block settings including the post limit are used to retrieve more posts, you have to change the limit passed to this function, ex. – http://screencast.com/t/CkndAHXI2http://screencast.com/t/U37s4Dgc

If you don’t have programming experience i suggest that you look for a professional to help you with this task.

Thank you!

Post count: 8

Hi Emil,

I just used the hardcoded solution from your screenshot. It works perfectly fine for me.

Thank you.

Post count: 8

Sadly I still have a problem. I now load 10 instead of 14 items. But the first 3 are duplicates.

Post count: 1291

Hi,

My example was just a tip, it’s not a full solution. This is complicated piece of code and my advice is to hire a professional developer to help you with this task.

Thank you!

Post count: 8

I’m a professional Developer….

It’s your code…so thanks for the help.

Post count: 1291

Hi,

The code uses the block settings and it should generate the same number of items on load more. I didn’t do any tests with a different value so i cannot tell you exactly what has to be adjusted, you have to make some tests. The code creates a script which is added on top of the block – http://screencast.com/t/S1v9IcNQdioc – the data is used for new requests on pagination (load more, next-prev, infinite load).
On your code i suspect you load 14 posts and then you set 10 for the next load, the offset is set to 10 instead of 14 and this may be the cause why you get duplicate posts. Hope this helps.

Thank you!

Post count: 8

Hi Emil,

I understand that support is limited. Thank you.

For evrybody intrested. I was able to solve this by adding four to the offset:
$this->atts[‘offset’] = 9;

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.