You really need to add a dataset onReady following the page onReady to make sure your collection is ready to be accessed by the query -
$w.onReady( function() {
$w(“news”).onReady(() => {
.
.
});
});
You really need to add a dataset onReady following the page onReady to make sure your collection is ready to be accessed by the query -
$w.onReady( function() {
$w(“news”).onReady(() => {
.
.
});
});