Title: 404 on single
Last modified: September 1, 2020

---

# 404 on single

 *  Resolved [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/)
 * Hello,
 * I am having trouble here. I have two CPT and only one have custom taxonomy. When
   I enable the the rewrite rule for the CPT with custom taxonomy and visit the 
   page I get 404 page. The link looks just as it should but my post doesn’t show
   up. If I disable the rewrite rules it works just fine.
 * This is example of my CTP:
 *     ```
       function create_seath_cpt_stuff () {    
           $labels = array(                
               'name'                  => _x( 'stuff', 'Post type general name', 'seath' ),
               'singular_name'         => _x( 'stuff', 'Post type singular name', 'seath' ),
               'menu_name'             => _x( 'stuff', 'Admin Menu text', 'seath' ),
               'name_admin_bar'        => _x( 'stuff', 'Add New on Toolbar', 'seath' ),
               'add_new'               => __( 'Add New stuff', 'seath' ),
               'add_new_item'          => __( 'Add New stuff', 'seath' ),
               'new_item'              => __( 'New stuff', 'seath' ),
               'edit_item'             => __( 'Edit stuff', 'seath' ),
               'view_item'             => __( 'View stuff', 'seath' ),
               'all_items'             => __( 'All stuffs', 'seath' ),
               'search_items'          => __( 'Search stuffs', 'seath' ),
               'parent_item_colon'     => __( 'Parent stuff:', 'seath' ),
               'not_found'             => __( 'Nothing found.', 'seath' ),
               'not_found_in_trash'    => __( 'Nothing found in Trash.', 'seath' ),
               'archives'              => _x( 'stuff archives', 'seath' ),
           );     
           $args = array(
               'labels'             => $labels,
               'description'        => 'Just stuff.',
               'public'             => true,
               'publicly_queryable' => true,
               'show_ui'            => true,
               'show_in_menu'       => true,
               'query_var'          => true,
               'rewrite'            => array( 'slug' => 'stuff' ),
               'capability_type'    => 'post',
               'has_archive'        => true,
               'hierarchical'       => false,
               'menu_position'      => 6,
               'menu_icon'          => 'data:image/svg+xml;base64,' . base64_encodeff('<svg id="_x31__x2C_5" enable-background="new 0 0 24 24" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path style="fill:#fff;" d="m6.75 18c-.192 0-.384-.073-.53-.22-.293-.293-.293-.768 0-1.061l2.719-2.719-2.72-2.72c-.293-.293-.293-.768 0-1.061s.768-.293 1.061 0l3.25 3.25c.293.293.293.768 0 1.061l-3.25 3.25c-.146.147-.338.22-.53.22z"/><path style="fill:#fff;" d="m17.25 18h-4.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h4.5c.414 0 .75.336.75.75s-.336.75-.75.75z"/><path style="fill:#fff;" d="m21.25 23h-18.5c-1.517 0-2.75-1.233-2.75-2.75v-16.5c0-1.517 1.233-2.75 2.75-2.75h18.5c1.517 0 2.75 1.233 2.75 2.75v16.5c0 1.517-1.233 2.75-2.75 2.75zm-18.5-20.5c-.689 0-1.25.561-1.25 1.25v16.5c0 .689.561 1.25 1.25 1.25h18.5c.689 0 1.25-.561 1.25-1.25v-16.5c0-.689-.561-1.25-1.25-1.25z"/><path style="fill:#fff;" d="m23.25 6h-22.5c-.414 0-.75-.336-.75-.75s.336-.75.75-.75h22.5c.414 0 .75.336.75.75s-.336.75-.75.75z"/></svg>'),
               'supports'           => array( 'title', 'editor' ),
               'taxonomies'         => array( '' ),
               'show_in_rest'       => true
           );
           register_post_type('seath_stuff',$args);
       }
       add_action('init', 'create_seath_cpt_stuff', 0);
       ```
   
 * And example of my taxonomy:
 *     ```
       function register_taxonomy_for_custom_type() {
               register_taxonomy('seath_stuff_tags',
       		array('seath_stuff'), 
       		array(
                   'labels' => array(
                       'name'              => __( 'stuff Tag', 'taxonomy general name', 'seath' ),
                       'singular_name'     => __( 'stuff Tag', 'taxonomy singular name', 'seath' ),
                       'search_items'      => __( 'Search stuff Tags', 'seath' ),
                       'all_items'         => __( 'All stuff Tags', 'seath' ),
                       'parent_item'       => __( 'Parent stuff Tag', 'seath' ),
                       'parent_item_colon' => __( 'Parent stuff Tag:', 'seath' ),
                       'edit_item'         => __( 'Edit stuff Tag', 'seath' ),
                       'update_item'       => __( 'Update stuff Tag', 'seath' ),
                       'add_new_item'      => __( 'Add New stuff Tag', 'seath' ),
                       'new_item_name'     => __( 'New stuff Tag Name', 'seath' ),
                       'menu_name'         => __( 'stuff Tags', 'seath' ),
                   ),
                   'public'                => true,
                   'hierarchical'          => true,
                   'show_ui'               => true,
                   'show_in_menu'          => true,
                   'show_in_rest'          => false,
                   'show_admin_column'     => true, 
                   'rewrite'               => array( 'slug' => 'stuff-category' ),
                   'query_var'             => true,
             )
       	);
       }
       add_action( 'init', 'register_taxonomy_for_custom_type', 0 );
       ```
   
 * I have been trying to figure out if I made mistake someplace or whats going on,
   but I am not having any luck.
    Hope you can help. Thanks.
    -  This topic was modified 5 years, 8 months ago by [Seath](https://wordpress.org/support/users/seath/).

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13349999)
 * Hi [@seath](https://wordpress.org/support/users/seath/),
 * Thank you for your message.
 * I have created a test environment for you. Can you try to recreate your problem
   there? I will be very grateful!
 * Below are the login details:
 *     ```
       https://demo-02.gbiorczyk.pl/wp-admin/
       pckedi
       IB(wr2JV)6ti%Gax*d9APOeg
       ```
   
 * Below I am sending you data to FTP (access to the test environment):
 *     ```
       ftps://s20.mydevil.net
       f1297_seath
       IB(wr2JV)6ti%Gax*d9APOeg
       ```
   
 * Please try to reproduce your problem and review please me step by step how I 
   can repeat it.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352368)
 * Sorry for the late reply, just got home from work… I can’t login. Someone must
   have changed the password.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352594)
 * AHHHHHH I found the problem. Totally my fault. I didn’t know that the plugin 
   wont work on localhost. I am so embarrassed.
    Sorry and Thanks!
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352844)
 * [@seath](https://wordpress.org/support/users/seath/), please test it anyway in
   my environment. I would like to make sure everything works.
 * Below are the login details:
 *     ```
       https://demo-03.gbiorczyk.pl/wp-admin/
       seath
       IB(wr2JV)6ti%Gax*d9APOeg
       ```
   
 * Below I am sending you data to FTP (access to the test environment):
 *     ```
       ftps://s20.mydevil.net
       f1297_seath
       IB(wr2JV)6ti%Gax*d9APOeg
       ```
   
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352873)
 * [@mateuszgbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/) Done
   🙂
    -  This reply was modified 5 years, 8 months ago by [Seath](https://wordpress.org/support/users/seath/).
    -  This reply was modified 5 years, 8 months ago by [Seath](https://wordpress.org/support/users/seath/).
    -  This reply was modified 5 years, 8 months ago by [Seath](https://wordpress.org/support/users/seath/).
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352877)
 * [@seath](https://wordpress.org/support/users/seath/), have you checked if everything
   is working properly?
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352879)
 * Yes and looks like it does.
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352893)
 * [@seath](https://wordpress.org/support/users/seath/), have you managed to run
   everything on your environment?
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352909)
 * It works perfectly on my site (online). But it doesn’t work on my localhost (
   offline).
    But that’s OK I guess, don’t really need it till I go online since
   I use only dummy content on my localhost anyway.
 *  Plugin Author [Mateusz Gbiorczyk](https://wordpress.org/support/users/mateuszgbiorczyk/)
 * (@mateuszgbiorczyk)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352917)
 * [@seath](https://wordpress.org/support/users/seath/), so you are satisfied with
   how the plug works? Could I ask you to add a review? The reviews help a lot with
   the promotion and development of the plugin.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352921)
 * Yes I am 😉 Ofc I will. Thanks for your help.
 *  Thread Starter [Seath](https://wordpress.org/support/users/seath/)
 * (@seath)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352949)
 * Ha! I just noticed that I left you review already 2 years and 4 months ago! That’s
   how long I have been using your plugin on my other sites.
    Thanks for great work.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘404 on single’ is closed to new replies.

 * ![](https://ps.w.org/wp-better-permalinks/assets/icon-256x256.png?rev=2636286)
 * [WP Better Permalinks](https://wordpress.org/plugins/wp-better-permalinks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-better-permalinks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-better-permalinks/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-better-permalinks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-better-permalinks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-better-permalinks/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [Seath](https://wordpress.org/support/users/seath/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/404-on-single/#post-13352949)
 * Status: resolved