Help! – Odd problem with CSS selectors
-
Hi,
I’m trying to use Ajax Load More on a list of posts and style the posts differently so that every 1st and 4th element look different (i.e. narrower) than the 2nd and 3rd.
My problem is I can target the 1st and 4th element correctly and style them as desired, but when I do the plugin won’t automatically load the following posts once I reach the bottom of the page – I have to hit the Older Posts button instead. If I apply no different style, then the plugin will work automatically. I also tried creating a class via PHP rather than using CSS, but the problem remains.
Here’s my shortcode:
<?php echo do_shortcode('[ajax_load_more post_type="post" posts_per_page="4" transition="fade"]'); ?>
and here is my CSS:
#postList article { width: 65%; height: 100vh; float: left; position: relative; } #postList article:nth-of-type(1), #postList article:nth-of-type(4) { width: 35%; }
Any help would be MUCH appreciated!
- The topic ‘Help! – Odd problem with CSS selectors’ is closed to new replies.