I'd like to use a dynamic link that leads not to the list of posts, but to the latest post. Is there a way to do that?Thanks!
blackfishartstasmaniaAug 28please let me know if everything is working and ....LikeReactions03 comments3Views
This should link to the latest post!
If you can get to this place, it's very straight-forward! Lemme know if you need help getting here though :)
You can do it using Velo. This requires a few lines of code.
Query Posts data collection to get the latest post and set link to a button.
Here's a short example where "#latestPostButton1" is your button id:
import wixData from 'wix-data'; $w.onReady(function () { wixData.query("Blog/Posts") .limit(1) .find() .then(results => { $w("#latestPostButton1").link = results.items[0].postPageUrl; }) });
I hope this helps