add_shortcode — Add a shortcode.

New in version 2.2.

View-related functions

Summary

add_shortcode($shortcodeName, $function)

Add a shortcode.

Parameters:
  • $shortcodeName (string) – Name of the new shortcode.
  • $function (callback) – Callback to execute for this shortcode.

Usage

Examples

See Also