Hi @zackrose21
TBH I havenât used ACF. Looks like youâve managed to add it to the WP REST API - I think you need a separate plugin to do that. Youâll probably need to do a fetch from within the component thatâs rendering your single post page. See here for more info.
Okay
So say I have my assets pulled through and render them on the page eg a text and image. Then say I want to be able use that layout anywhere across the site. Would I make a new folder with whatever I want to call that reusable layout with an index and styles.js and then import it anywhere?
Thank you
I think it needs to be something like:
&:after {
background: rgba(0, 0, 0, 0.7);
}
Frontity uses the Emotion library for CSS-in-JS, you can find the Emotion docs here.
Hope this helps.
You donât necessarily need a new folder, but creating a new component in a separate file is a good idea. The styles could be in a separate file or could be included in the same file as the component. See mars-theme for examples of how the component and styles are in the same file.
Thank you
Is it possible to install and try to use the frontity theme as a test ? https://github.com/frontity/frontity.org
Thank you
Z
Yes, go ahead and clone the repo - itâs OSS.
A better way would be to check the isHome
boolean property.
The content from the gutenberg blocks should be in the content.rendered
property for the post/page. The styling may not be the same though. Take a look at the frontity theme for examples of working with gutenberg blocks, as you suggested.
Also take a look at this post.
A better way would be to check the
isHome boolean property.
ah yeah good point
1 Like