You can pass a string for has_archive
. That string will be used as archive URL.
So in your registration code use:
'has_archive' => 'jobs'
From the register_post_type()
declaration in WordPress core:
if ( $args->has_archive ) {
$archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive;
if ( $args->rewrite['with_front'] )
$archive_slug = substr( $wp_rewrite->front, 1 ) . $archive_slug;
else
$archive_slug = $wp_rewrite->root . $archive_slug;
As you can see, has_archive
is tested for a string. If it is a string, that string will be used. If it is TRUE
the slug will be used. The string wins.