HTTP/2 301
server: nginx
date: Mon, 29 Dec 2025 21:47:20 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/functions/get_options/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
HTTP/2 200
server: nginx
date: Mon, 29 Dec 2025 21:47:20 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
get_options() – Function | Developer.WordPress.org
get_options( string[] $options ): array
Retrieves multiple options.
Options are loaded as necessary first in order to use a single database query at most.
$optionsstring[]requiredAn array of option names to retrieve.
array An array of key-value pairs for the requested options.
function get_options( $options ) {
wp_prime_option_caches( $options );
$result = array();
foreach ( $options as $option ) {
$result[ $option ] = get_option( $option );
}
return $result;
}
View all references View on Trac View on GitHub
| Version | Description |
|---|
| 6.4.0 | Introduced. |
You can retrieves multiple options using option keys, like below: