The featured posts block dynamically pulls in featured posts from any collection with any category filter or tag filter.
- Upload featured.block to your /blocks/ folder.
- In any .list, .item, or .region file, add this partial: {@|apply featured.block}
- You can remove category and tag support by removing those attributes from the squarespace:query tag.
- The block currently returns 3 results. You can change that by editing the "limit" attribute in the squarespace:query tag.
- There is currently a feature that shows a message if no items are returned. You can change that my removing lines 12 and 13. If you remove that feature, nothing will show up in the markup in the event there are no items returned.
By: Kevin Foley
I am a Squarespace employee but this Gist is not a supported Squarespace feature. (That doesn't mean it's not awesome :)
Squarespace Query Docs: https://developers.squarespace.com/squarespace-query/