Skip first blog post in post list

Greetings all! I’m looking for some help trying to make a post list, but skipping the most recent posting so it shows blog posts 2-4 by publish date. I assume I can use the skip function, but am having trouble writing the code to populate the post list with the results. Would someone be able to help me out?

Where is your already generated code?

@russian-dima thanks for replying. I think I figured it out just by using a blank repeater rather than a post list.

import wixData from 'wix-data';


$w.onReady(function () {
  $w("#recentnewsrepeater").onItemReady(($item, itemData, index) => {
    $item("#NewsTitle").text = itemData.title;
    $item("#NewsExcerpt").text = itemData.excerpt;
    $item("#NewsImage").src = itemData.coverImage;
    $item("#NewsLink").link = itemData.postPageUrl;
  });


  wixData.query("Blog/Posts")
    .skip(1)
	.limit(3)
	.find()
    .then((results) => {
      if (results.totalCount > 0) {
        $w("#recentnewsrepeater").data = results.items;
      } 
    })
    .catch((error) => {
      console.log("Error:", error.message);
    }); 
});
1 Like

Well done!
And yes you used the right commands for it…

.skip(1)
.limit(3)