imranhsayed / nextjs-headless-wordpress

🔥 Nextjs Headless WordPress
https://codeytek.com/course/next-js-headless-wordpress-course/
GNU General Public License v3.0
640 stars 161 forks source link

Create Duplicate pages with dynamic [..slug].js files for pages and blog as well #65

Open bindaasrakesh opened 3 years ago

bindaasrakesh commented 3 years ago

Hi @imranhsayed , I created a Next JS project with wpgraqhl. I follow all your tutorials steps. I have faced one issues here details are given below -

1) page/[slug] - These files are created for dynamic WordPress pages. But I noticed that it creates single post for every posts aswell. So please look into this and provide better solution that how can we stop creating single post page from these files.

URL - https://raw.githubusercontent.com/imranhsayed/nextjs-headless-wordpress/main/frontend/pages/%5B...slug%5D.js

2) Pages/Blog/[slug].js - And same thing happen here, This files creating for dynamic posts single page. But it also created the dynamic pages as well.

URL - https://raw.githubusercontent.com/imranhsayed/nextjs-headless-wordpress/main/frontend/pages/blog/%5Bslug%5D.js