Issue with post loops

Posted in: Newspaper
Post count: 195

Hey there!

I want to do the following thing – on my category pages I want to have two different views – one for mobile and one for desktop. On the desktop element I want to have infinite load that loads 12 articles whereas on the mobile I want to have next / prev ajax and load only 6 articles per page. To do this I created two separate post loops one for desktop and one for mobile respectively and hide the first one for mobile and vice versa. What I notice however is that if I set 6 article limit on my mobile post loop, no matter what limit I set on the desktop one it always takes the limit of the first post loop element on the page. Is this normal or I am doing something wrong?

Is there a better approach for my task, if yes – please share it.

Post count: 21065

Hello!

Add two posts loop shortcodes and set a different limit for each shortcode. After the customization, hide only one on the desktop and only one on the mobile viewport, and make sure you choose to hide the right one and not the same shortcode. It should work well. Please recheck and try again. If the settings are correct, then there is an issue on your end, and be sure it is not from an extra plugin you’re using.

Thank you!

Post count: 195

How can I add a posts loop via a shortcode?

Post count: 21065

Hello!

This is a posts loop shortcode https://app.screencast.com/RQXwHdP8qvIEj
You can not add a shortcode to another shortcode.

Thank you!

Post count: 195

By saying shortcode I imagined you meant some kind of a way to call the element via html or so. Anyways, it doesn’t work as you have described. How can we troubleshoot the reason?

Post count: 21065

Hello!

Please get in touch with us via email at contact@tagdiv.com and provide the following:
– admin URL and credentials
– a link to this topic to identify you

Thank you!

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