WordPress reserved terms you should never use

While developing WordPress theme or plugin we use different WordPress keywords or terms, additionally while handling forms fields and custom post types we have to consider what names we can use or not. The restricted names are called reserved terms.

WordPress itself reserves few keywords or terms which we can not use in our coding. Using these reserved or restricted terms just break the functionality what we intend to get.

You should avoid using these reserved terms in the following scenarios:

  1. Passing a term through a $_GET or $_POST array.
  2. Registering a taxonomy or post type slug
  3. Handling query variables

List of reserved keywords in alphabetical order

attachmentattachment_idauthor
author_namecalendarcat
categorycategory__andcategory__in
category__not_incategory__not_incategory_name
comments_per_pagecomments_popupcustom
customize_messenger_channelcustomizedcpage
daydebugembed
errorexactfeed
hourlink_categorym
minutemonthnummore
namenav_menunonce
nopagingoffsetorder
orderbyppage
page_idpagedpagename
pbpermpost
post__inpost__not_inpost_format
post_mime_typepost_statuspost_tag
post_typepostsposts_per_archive_page
posts_per_pagepreviewrobots
ssearchsecond
sentenceshowpostsstatic
subpostsubpost_idtag
tag__andtag__intag__not_in
tag_idtag_slug__andtag_slug__in
taxonomytbterm
termsthemetitle
typewwithcomments
withoutcommentsyear 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Wavesdream

Subscribe now to keep reading and get access to the full archive.

Continue reading