Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String value for "has_archive" not respected #199

Open
JacobDB opened this issue Apr 28, 2022 · 1 comment
Open

String value for "has_archive" not respected #199

JacobDB opened this issue Apr 28, 2022 · 1 comment

Comments

@JacobDB
Copy link

JacobDB commented Apr 28, 2022

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
Copy link
Author

JacobDB commented Apr 28, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant