permalink to custom post type gives me 404 error
-
hello
when i have turned off custom permalinks (when wordpress links i.e. ?post=44) everything works ok. all links points to correct posts, pages, and custom post types.
but when i turn on permalinks, links to my custom post types shows error 404. i think i read everything about this in internet and i didnt found solution.
this is the way how i registered my custom post type (called “Domeny”):
add_action('init', 'dodajDomeny'); function dodajDomeny() { $labels = array( 'name' => _x('Domeny', 'nazwa typu postów do wystawiania domen'), 'singular_name' => _x('Domena'), 'add_new' => _x('Dodaj domen?'), 'add_new_item' => _x('Dodaj now? domen?'), 'edit_item' => _x('Edytuj domen?') ); $args = array( 'labels' => $labels, 'public' => true, 'supports' => array('title', 'editor', 'page-attributes', 'custom-fields'), 'query_var' => true, 'capability_type' => 'post', '_builtin' => false, 'rewrite' => array("slug" => "domena"), 'publicly_queryable' => TRUE, 'taxonomies' => array('cena', 'formaSprzedazy') ); register_post_type('Domeny', $args); }
any idea what is wrong? now in url i have, for example:
https://example.com/domena/premium-pl/
but page is showing error 404
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘permalink to custom post type gives me 404 error’ is closed to new replies.