remove_shortcode( string $tag )

Removes hook for shortcode.

Description Description

Parameters Parameters


(string) (Required) Shortcode tag to remove hook for.

Top ↑

Source Source

File: wp-includes/shortcodes.php

function remove_shortcode($tag) {
	global $shortcode_tags;


Top ↑

Changelog Changelog

Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note content
    Contributed by Aurovrata Venet
    //add a custom shortcode 
    add_action( 'init', 'my_add_shortcodes' );
    function my_add_shortcodes() {
    	add_shortcode( 'myShortcode', 'my_shortcode_function' );
    //which can also remove 
    add_action( 'init', 'remove_my_shortcodes',20 );
    function remove_my_shortcodes() {
    	remove_shortcode( 'myShortcode' );

You must log in before being able to contribute a note or feedback.