Skip to content

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

@bindaasrakesh

Description

@bindaasrakesh

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

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions