1

I registered a custom post type called 'parttime-courses' like so:

$args = array(
    'labels'              => $labels,
    'description'         => 'Holds our part time/short courses and course specific data',
    'public'              => true,
    'supports'            => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
    'has_archive'         => true,
    'exclude_from_search' => false,
    'taxonomies'          => array('vendor', 'parttime_course_tag'),
    'rewrite'             => array( 
            'slug'              => 'parttime-courses',
            'with_front'        => true,
            'hierarchical'      => true,
            'ep_mask'           => EP_NONE
    )
);

register_post_type( 'parttime-courses', $args ); 

Everything works fine, except in the editor the Permalink section is empty and also on the Archive page all posts are showing but the links for each one is empty. I can however visit a single post by typing in the URL manually.

I also checked the error log and flushed permalinks.

Any advise? Thanks

Chris

  • 1
    why do you use ep_mask => EP_NONE ? remove the rewrite part to try with defaults values – mmm Oct 18 '17 at 21:36
  • I tried that, but it doesnt work – Chris Oct 19 '17 at 8:37

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.