RecapRabbitHole Posted May 13, 2020 Share Posted May 13, 2020 Site URL: https://www.recaprabbithole.com/ I want the most recent 10 blog posts to come up on mobile, but only 8 to come up on the desktop version (as they do now - Its currently 8 on web and mobile). What CSS do I use to make this happen? - recaprabbithole.com Link to comment
moeezali Posted May 13, 2020 Share Posted May 13, 2020 Hi @RecapRabbitHole Navigate to your Blog Settings and increase the number of posts per page to 10 (see attached). then paste this code in Custom CSS @media(max-width: 767px) { .blog-basic-grid article.entry.blog-item:nth-child(9), .blog-basic-grid article.entry.blog-item:nth-child(10) { display: none; } } let me know if you still have any confusion. Link to comment
RecapRabbitHole Posted May 14, 2020 Author Share Posted May 14, 2020 Hi @moeezali Unfortunately this gives me the inverse of what I would like. Currently I have: 8 Blog posts displayed on Web 8 Blog posts displayed on Mobile. I want: 8 Blog posts displayed on Web 10 (n) Blog posts displayed on Mobile. (n) - being a variable I can change. Sorry about that, I don't think my wording was very clear to begin with. I think your code should be: @media(min-width: 760px) { .blog-basic-grid article.entry.blog-item:nth-child(9), .blog-basic-grid article.entry.blog-item:nth-child(10) { display: none; } } This code, with my change, gives me the desired result. Thanks! your code did the heavy lifting. Great Job! - recaprabbithole.com Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.