HTTP/2 301
server: nginx
date: Sun, 28 Dec 2025 07:02:14 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/apply_shortcodes/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
HTTP/2 200
server: nginx
date: Sun, 28 Dec 2025 07:02:15 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 2
apply_shortcodes() – Function | Developer.WordPress.org
apply_shortcodes( string $content, bool $ignore_html = false ): string
Searches content for shortcodes and filter shortcodes through their hooks.
$contentstringrequiredContent to search for shortcodes.
$ignore_htmlbooloptionalWhen true, shortcodes inside HTML elements will be skipped.
Default:false
string Content with shortcodes filtered out.
| Version | Description |
|---|
| 5.4.0 | Introduced. |
Here is the implementation by current method –
And here is the usage which new WordPress 5.4 Introduces
Old method –
WordPress 5.4 Introduces apply_shortcodes()
// Displays the result of the shortcode