I created a wordpress plugin and I added shortcode feature to it. but i want to execute only one shortcode and prevent applying of multiple shortcodes if the administrator did so.
1 Answer
Just remove the shortcode during the first call.
add_shortcode( 'foo', 'foo_shortcode_handler' );
function foo_shortcode_handler()
{
remove_shortcode( 'foo' );
return 'bar';
}