Shortcode not appearing when used as post content in wp_insert_post() or possibly, shortcode not being registered at all
You’re only registering the shortcode on activation. add_shortcode() is not persistent, and since shortcodes are parsed on output, the shortcode needs to be registered on every request. So you need to move add_shortcode() outside of the activation hook: function install_myplugin() { // … } function uninstall_myplugin() { // … } function myplugin_shortcode_reference() { // … … Read more