String value for "has_archive" not respected
JacobDB opened this issue · 1 comments
JacobDB commented
I'm trying to use a custom slug for the archive as compared to the singles (i.e. "contractors" for the archive and "contractor" for the singles), but when I set a string value to has_archive
, it's not being respected. I've flushed permalinks after making this change. Is this something I'm doing wrong, or an issue with this library?
register_extended_post_type("contractor", [
"has_archive" => "contractors",
"menu_icon" => "dashicons-location",
"supports" => [
"title",
"thumbnail",
"revisions",
],
],
[
"plural" => __("Contractors", "fcai"),
"singular" => __("Contractor", "fcai"),
"slug" => "contractor",
]);
References:
JacobDB commented
It does actually seem to be working when I retrieve it via get_post_type_archive_link("contractor")
, but even after saving permalinks multiple times it still 404s