add_shortcode — Add a shortcode.

New in version 2.2.

Plugin-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