Pull data from wordpress page

Hi everyone,

So I’ve been at this long enough today I thought I’d officially reach out.
I’m having trouble pulling in page data from my wordpress site. I have followed all resources I could find online in terms of updating the menu array in frontify.settings.js but to no avail. I am getting a 404 error. Any and all help would be appreciated.

repo: https://github.com/Trevorton27/frontityPersonalSite.git
Wp rest api url: https://trevormearnssource.cyou/

Thank you very much in advance.

Hi @spiral272

Welcome to the Community!

Here you have a guide that explains how to properly set the URL of the WordPress data source

Hope this helps

Hi there @juanma. Thank you for reaching out. I’ve worked through the resources in the link and am returning data in the console but nothing on the page(s) yet.

Here is what I have in my frontity.settins.js:

Still not clear why nothing is coming through on the page. Any ideas?

See frontityPersonalSite/index.js at main · Trevorton27/frontityPersonalSite · GitHub

There is simply no component which should render a page, so the problem is in your theme.

Hey there @Johan. Thank you for your response. Yes, I took a look at the awsmin/f1 theme and got it working since there is logic built in to handle page rendering. It’s a shame because the Chakra theme is so beautiful. I just don’t have the time to go through all the work of building out a page component. Although, would you recommend doing so?

I have different types of pages, so each of them has its own component (or is shared):

   <Loading when={data.isFetching} />
   <Single when={data.isHome} isHome="true" />
   <Blog when={data.isArchive} />
   <Article when={data.isPost} />
   <Single when={data.isPage} />
   <PageError when={data.isError} />
   <Jobs when={data.isAwsmJobOpeningsArchive} />
   <Job when={data.isAwsmJobOpenings} />

Which is because some content types have different elements to handle, besides the fact I want to have full control of how stuff looks.
Technically you should be able to handle a page through the Post component:

<Post when={data.isPage} />
1 Like

@Johan Oh, wow, that’s brilliant. Is this a theme you’ve developed yourself?

It’s a custom theme I’m currently working on, which is completely build from scratch (with some Copy&Paste from existing themes and this forum).

1 Like

Nice. I’d be interested in looking at it when it’s done if you don’t mind sharing. :slightly_smiling_face: