On my website, there is 2 separate page, one is the home page which contains company regarding and business regarding info. And another one is a blog page that contains all the blogs. We want to configure our website using the frontity application. We are trying through the frontity app, We are able to figure out how to design the home page, but We are struck at the blog page. Because we have received all data.Items which are all post data inside the isHome page. We want to configure that data inside the /blog/ path.
Please suggest how we can achive that.
Hi @ntb939! Welcome to the community
In order to achieve that you just have to configure the settings postsPage
and homepage
of the wp-source
package. You can do it in your frontity.settings.js
file of your project and write something like this:
...
packages: [
...
{
name: "@frontity/wp-source",
state: {
source: {
api: "https://test.frontity.io/wp-json",
postsPage: "/blog",
homepage: "/my-page"
}
}
}
...
]
The postsPage
setting lets you load the latest posts on a different url, /blog
for example. While homepage
setting lets you load a static page in the homepage instead of a list of posts.
Note that you have to have the same settings in your WordPress.
If you have any problem with this approach let us know
SantosGuillamot, Thank you. It’s work.
2 Likes