The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
First of all, sorry as I’m a total newbie in this but absolutely love this project. Trying to get it working but somehow none of the possible source URLs do not seem to work - they just give a 404 when I change the original link https://test.frontity.io/wp-json/ to it. We got a pretty simple page with a separate blog part (so a static front page with non-blog content and a separate section on the site with blog content).
Hello @jarmo it looks like your REST API is not accessible.
It is possible that either your hosting or either some plugin has blocked it. Can you please take a look at it?
luisherranz5
@sonicares could you please let us know the url of your API? We’ll take a look to see what may be wrong.
1 Like
jarmo6
Hi,
You’re totally right - a plugin had banned it for non-admin users. But now that setting is removed and verified with Postman. Still the same issue somehow.
The problem could be just the one that I just mentioned so try again when it has been fixed! (P.S. You will have to execute npm install to update to the last version).
The way to get media images is using state.source.attachment so you should use
If you have any other doubts or questions, feel free to ask!
4 Likes
luisherranz9
The fix has been released. Please update @frontity/wp-source to the latest version with:
npm install @frontity/wp-source@latest
1 Like
sonicares10
Thankyou. I am trying to use this by
{fmedia.rendered}
but its giving me an error. How do I display this image?
luisherranz11
You can explore the data using frontity.state in the console of your browser, like this:
The data structure you are going to find in frontity.state.source is the same you can find in the REST API. For example, this is an attachment: https://www.nextgaything.com/wp-json/wp/v2/media/567638
And you can see it in your state using: frontity.state.source.attachment[567638].
With attachments you usually want to use source_url or the info inside media_details.sizes.