I have developed a plugin on one site and just now moved it to another. At start I had that problem in the initial site too. Saving permalinks again solved it in the initial website.

I then moved it to the new website and I am getting it again. I tried to save the permalinks settings again but it isn't helping.

I saw multiple solutions but none solved the issue.

This is how I create the custom post type:

register_post_type( 'ossp',
        'labels'       => array(
            'name'       => __( 'Sale Page' ),
     'rewrite' => array( 'slug' => 'sale-page', 'with_front' => false ),
     'public'                   => true,
     'hierarchical'         => true,
     'has_archive'          => true,
     'publicly_queryable'   => true,
     'supports'     => array(
         // 'page-attributes',

If any more information is needed, tell me and I'll edit the question.


  • How you are displaying the 'Sale Pages' on the front-end? – shihab Mar 17 at 10:50
  • With a layout I've built, In the theme-child folder – Omer Mar 17 at 10:53
  • Please share the WP_Query for this post type. – shihab Mar 17 at 10:55
  • Where do I get it from? – Omer Mar 17 at 10:59
  • Please conduct a basic debugging first, then you might get a good way to proceed. – Mayeenul Islam Mar 17 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.