I just created a new site following the getting started instructions but nothing shows for my home page. The other pages I have created work. Does anyone know why this might be?
Hi @thomaskiddle0, welcome to the community!
Can you share a repository with the code of your project? Are you receiving any error in the terminal? And in the browser’s console?
no errors in terminal or console.
heres a link.
Hi @thomaskiddle0,
It seems you don’t have any post in your HomePage
That’s what Frontity it’s not showing anything.
/frontity.settings.js
"name": "@frontity/wp-source",
"state": {
"source": {
"api": "https://public-api.wordpress.com/wp/v2/sites/devrelfrontity.wordpress.com",
"Homepage": "/",
}
}
You can restore the source.api
to the REST API provided by Frontity by default and you’ll see some posts in your HomePage
From there, adjust the configuration of your WP to fit it to your need (Maybe displaying latest posts in the Home?)
I’m guessing that you changed the configuration of your Homepage to point to static page
In that case the state.source.homepage
property (in the frontity.settings.js
file) should be set to the slug of the homepage defined in the WP admin, not the path. So in this example, it should be ‘about’, rather than ‘/’.
Also be aware that you’ve capitalised the property name as Homepage
rather than homepage
Hope this helps
Thanks for the reply. I set the home page as not being the homepage on WP and then used the slug and that works but it has the slug as part of the address ie localhost/home-page. Is there a way to get it so it doesn’t have a slug? or would I need to put all the content as posts? so it shows on the frontity homepage?