Comments on: Headless WordPress with React and NextJS (Part 1) https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/ WordPress Design and Development Agency Mon, 15 Apr 2024 15:59:16 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: Lax Mariappan https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-163706 Wed, 04 Oct 2023 17:51:51 +0000 https://webdevstudios.com/?p=19391#comment-163706 In reply to Christoph.

Hello Chris,

Headless CMS is overkill if you have only one calculator or such content to be embedded.

If you want to exclude the header and footer and show just the calculator via iframe, try using a separate page template. [https://stackoverflow.com/a/51504775]

Using this approach, you can control the calculator’s design and embed it anywhere via iframe.

Also, make sure that the style and script tags are loading the resources. You can add the calculator site as a trusted oembed provider using this hook wp_oembed_add_provider.

]]>
By: Christoph https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-163541 Sun, 01 Oct 2023 12:19:21 +0000 https://webdevstudios.com/?p=19391#comment-163541 Hello,
I would like to deliver WordPress Content “embedded” on another website.
The content is an interactive calculator.

iframe isn’t that good looking. Also I would prefer to disable the WordPress Frontend to make the content only visible at the destination URL.

Is headless cms the way to go or am I wrong?

Best Regards

]]>
By: Matheus Paiva https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-73618 Tue, 13 Aug 2019 11:32:41 +0000 https://webdevstudios.com/?p=19391#comment-73618 Hello, thanks for your post. One doubt: why port 8000 would be safer than port 3000?

]]>
By: Mulli Bahr https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-70509 Tue, 02 Jul 2019 13:18:20 +0000 https://webdevstudios.com/?p=19391#comment-70509 Ignore my last comment…
I got 404 for putting posts in wrong place…

]]>
By: Mulli https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-70508 Tue, 02 Jul 2019 13:10:21 +0000 https://webdevstudios.com/?p=19391#comment-70508 Got 404 on localhost:8080/posts

How do I debug it?

]]>
By: Daniel https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-67940 Tue, 21 May 2019 18:50:38 +0000 https://webdevstudios.com/?p=19391#comment-67940 Hi

just wanted to tell you about my project doing the same thing with Vue.js/Nuxt.js. It’s a complete dockerized dev environment. Maybe you’ve got some feedback?
https://github.com/northosts/wuxt

]]>
By: Jeremy Ward https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-60583 Wed, 20 Mar 2019 17:20:53 +0000 https://webdevstudios.com/?p=19391#comment-60583 In reply to Michael.

Hey, Michael!

Jo’s example in the posts.js file define’s for NextJS what the initial properties should be. NextJS is responsible for calling that method on the Component object. You can see one example inside the library here: https://github.com/zeit/next.js/blob/b88addfcd5d3d305664ff95a709b4a4df7e0cbcf/packages/next-server/lib/utils.js#L38), where the getIntialProps method is called on the component.

]]>
By: Michael https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-60500 Tue, 19 Mar 2019 22:32:32 +0000 https://webdevstudios.com/?p=19391#comment-60500 Hey

Awesome tutorial! Very helpful for me.
I have a question regarding the static method getInitialProps(). I don’t understand where this method is being called?

]]>
By: Jo Murgel https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-59756 Mon, 11 Mar 2019 19:11:45 +0000 https://webdevstudios.com/?p=19391#comment-59756 In reply to Alex.

Thanks for finding that typo!

Things like GraphQL or Firebase or anything we can do to make our request faster or more dynamic would certainly help speed up the front-end of an app like this. I haven’t thought about it for this demo specifically, but that is certainly something worth writing about.

]]>
By: Alex https://webdevstudios.com/2019/01/03/headless-wordpress-with-react-and-nextjs-1/#comment-59494 Sun, 10 Mar 2019 06:40:46 +0000 https://webdevstudios.com/?p=19391#comment-59494 Just awesome!
Exactly what was looking for! Thanks for a great job, Jo!
Did you wonder about using graphql with this as well? =)

Small type in code – `hOur Posts Page!`. Extra `h` within h1 tag.

]]>