Hello,
Sorry if this has already been discussed but couldn’t find anything/didn’t know which keywords to search for.
I’m working on a project that includes a blog. As I don’t like the posts design, I wanted to add a full-width banner and the post’s title in the banner.
To process, I’ve added a dataset to my posts page, linked it to blog posts etc. Problem is: the dataset will select the last entry by default.
So I thought that I should made a dynamic page which could be the solution. However, the post will only keep the text and not its styles. Even worse, it won’t keep the medias used in the posts. I could add a “picture” entry in my database, however, my blog posts won’t have the same amount of pictures so it’ll be a problem…
I don’t know if it’s clear enough - I’m not allowed to publish screenshots for this project but if necessary I’ll do something about it.
If you have any solution, I’d gladly listen. Note that I’m a beginner in code.
Thanks
Hi 
If I understood your issue, the titles in the banner show the latest post, while you want the oldest one, right? If so, you can just sort the dataset using the dataset settings panel, or by code.
For the styles of the blog, I think that you’re using the .text method to show the text from the database.
$w('#blogBody').text = // something
For rich texts, try using the .html method.
$w('#blogBody').html = // something
Hope that helped~!
Ahmad
Hi!
Thanks for your answer but it’s not exactly my problem. Rich texts will only keep the styles but I need a way to keep all my post, including pictures. It would have been easier if I could just add the “post” item in a dynamic page but Wix won’t allow.
I’ve made these, maybe it’s clearer this way. If I sort the dataset to newest, oldest, or whatever, it’ll change for every posts. The dataset doesn’t seem to know on which post I am
So you just want a specific blog posts, right? If that’s the case, I suggest that you disconnect the repeater from the dataset and use Wix Data API to query the collection and get the posts you want, set them as the repeater data and populate the repeater.
I didn’t add any repeater for the blog, I just used the regular blog widget from Wix. I’m not sure I understood well but I’ll give a glance, thanks