• Resolved Patrick Whitty-Clarke

    (@zerodegreeburn)


    Hi,

    I just spent a while figuring out what the hell was going on when my custom theme starting using index.php for all pages. Turns out I had registered a custom taxonomy of year and it was messing everything up. From the codex, there is a list of reserved terms you aren’t supposed to use. It would be great if this plugin had a simple javascript alert that warned you of the reserved terms when creating a CPT or taxonomy:

    attachment
    attachment_id
    author
    author_name
    calendar
    cat
    category
    category__and
    category__in
    category__not_in
    category_name
    comments_per_page
    comments_popup
    customize_messenger_channel
    customized
    cpage
    day
    debug
    error
    exact
    feed
    hour
    link_category
    m
    minute
    monthnum
    more
    name
    nav_menu
    nonce
    nopaging
    offset
    order
    orderby
    p
    page
    page_id
    paged
    pagename
    pb
    perm
    post
    post__in
    post__not_in
    post_format
    post_mime_type
    post_status
    post_tag
    post_type
    posts
    posts_per_archive_page
    posts_per_page
    preview
    robots
    s
    search
    second
    sentence
    showposts
    static
    subpost
    subpost_id
    tag
    tag__and
    tag__in
    tag__not_in
    tag_id
    tag_slug__and
    tag_slug__in
    taxonomy
    tb
    term
    theme
    type
    w
    withcomments
    withoutcomments
    year

    http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms

    I’ve also had this problem a year or two ago when I tried to use a category name that was the same as a taxonomy.

    This could also be a core feature of WordPress – you could get a warning message in the header saying you are using a reserved term for one of your posts/taxonomies etc which was printed if WP_DEBUG was turned on.

    https://wordpress.org/plugins/custom-post-type-ui/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Suggestion: Add warning for reserved terms’ is closed to new replies.