V
V
Vadim Sverdlik2020-05-11 23:15:01
WordPress
Vadim Sverdlik, 2020-05-11 23:15:01

How to display a different number of posts on Wordpress based on the screen size?

Please tell me what is the best thing to do in a situation if on each of the main extensions you need to display a different number of posts, that is, on desktops 10 on mobile 5, and the parameter is set once in the admin panel in the settings, how can I get around or change this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2020-05-11
@vadim_sverdlik

Set the number of posts to display via pre_get_posts and check the device via wp_is_mobile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question