Welcome to the official home of the WordPress Documentation Team.
This team is responsible for coordinating all documentation initiatives around WordPress, including the handbooks and other general wordsmithing across the WordPress project.
Want to get involved?
Start here to find out more about what we do and how to contribute:
Documentation Issue Tracker on GitHub: Submit any Documentation Team-related issues on GitHubGitHubGitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/
Weekly meetings
Join our discussions of documentation issues here on the blog and on Slack.
Highlight: Insert code-related content in monospace code font.
In text content, use monospace code font to highlight and distinguish code content from standard text. To express code font in HTML, use the <code> element. In Markdown, use backticks (`) for code font.
This page explains how to format code in standard text sentences. For more information about other code-related documentation, see Code examples, Placeholders, and Command-line syntax.
Element names in XML and HTML. Place angle brackets (<>) around the element name; you may have to escape the angle brackets to make them appear in the document.
UI elements that implement previously entered text input. For example, if the user was instructed to enter a name for a UI element as post-name, then when you tell them to click the element, use code font and bold: Click post-name.
When you refer to a method name in text, omit the class name except where including it would prevent ambiguity. Insert empty parentheses at the end of the method name to indicate that it’s a method.
Examples
Not recommended: To delete a file or directory, call the WP_Filesystem_ftpsockets::delete() method.
Recommended: To delete a file or directory, call the delete() method.
To mark a block of code such as a lengthy command or a code example, use the following formatting:
In HTML, use the <pre> element.
In Markdown, use a code fence (```).
Formatting a command with multiple elements:
When a line exceeds 100 characters, you can safely add a line break before some characters, such as a single hyphen, double hyphen, underscore, or quotation marks. After the first line, indent each line by four spaces to vertically align each line that follows a line break.
If you split a command line with a line break, each line except the last line must end with the command-continuation character. Commands that don’t have the command-continuation character don’t work. Command-continuation characters are:
Linux or shell: A backslash preceded with a space (\)
Write a descriptive list of the placeholder variables used in the command line succeeding the command line. For more information, see Describing placeholders.
Avoid using technical keywords as verbs or nouns. If you have to, don’t change the word form of the keywords; don’t make plurals from keywords, change tense, or convert them to possessive form. It’s acceptable to use lowercase, plain text string in a general discussion of the STRING data type.
Examples
Not recommended:Decompress the encoded body.
Recommended: Decompress the encoded body by using a decompress request.
Not recommended: Retrieve information by getting the data.
Recommended: To retrieve the data, send a get request.
Not recommended: Before patch()ing, make sure your request is post()ed.
Recommended: Send a post() request before calling a patch() request.
Use the following formatting and phrasing to refer to a single HTTP status code: an HTTP 500 Internal server error status code.
Insert the HTTP status code number and name in code font. Specifically use status code rather than error code or response code. If HTTP is implied from context, it is acceptable to exclude it.
Use the following formatting to refer a range of HTTP status codes: an HTTP 2xx or 300 status code.
Insert the HTTP status code number in code font even if you’re excluding the code name. Use Nxx where N is a digit, to indicate anything in the N00 to N99 range.
Use the following formatting to specify an exact range of HTTP status codes: an HTTP status code in the 200–299 range.