How can I fetch page with slug


I was trying to fetch homepage of my wordpress site, but no success form me :sweat_smile:

How can I fetch /pages?slug=home?

You have WP configured to have a page in the home instead of the list of posts, right?

If so, you need to use the new homepage setting on wp-source:

Let us know if that works for you :slight_smile:

1 Like

Yeah it works; I tried putting other pages as homepage it works fine, but if I put / as path then it fetches blog posts; actually I have set static page as my home page and when you set home page as static you get / as your path to visit that page 56%20PM

Sorry for not making this clear when I had posted this question

Maybe you need to use homepage in conjunction with postsPage.

Is that the case @david?

Yeah, you need to add homepage and postsPage props in your frontity.settings.js with the slug of each page as values, and it should work.

1 Like

If that’s the case, could you please add a note in the docs stating that if you use one you should use the other one as well?

Sure, done!

1 Like

@wazidshh could you please confirm that everything works as expected when using the postsPage option?

@luisherranz Yeah it works. Thanks it’s amazing

1 Like

Great :smile::clap: