Title: [Plugin: Shortcoder] Plugin is buggy when used with Widgets
Last modified: August 20, 2016

---

# [Plugin: Shortcoder] Plugin is buggy when used with Widgets

 *  [dashaluna](https://wordpress.org/support/users/dashaluna/)
 * (@dashaluna)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-shortcoder-plugin-is-buggy-when-used-with-widgets/)
 * Hello,
 * I’m using [tinyMCE editor widget](http://wordpress.org/extend/plugins/black-studio-tinymce-widget/)
   and it would be amazing if Shortcoder was working with it correctly.
 * After installing the Shortcoder plugin, its button would appear in the tinyMCE
   widget ok. But clicking on it would do nothing. I have fixed that by changing
   the following function, where I added `widgets.php` to the list of pages where
   the shortcoder tab should be added:
 *     ```
       function sc_admin_footer(){
       	if(in_array($GLOBALS['pagenow'], array('post.php', 'post-new.php', 'widgets.php'))){
       		echo '<span id="sc_editorUrl" style="display:none;">' . SC_URL . 'sc-editor.php</span>';
       	}
       }
       ```
   
 * So now when I click on the button the tab appears. However, when I have several
   tinyMCE widgtes and I want to insert codecodes to all of them… the shortcodes
   are inserted into only one tinyMCE widget that was fist active/clicked on.
 * I’m not that great with tinyMCE and js, but in case when there are multiple tinyMCE
   editors, I think it somehow needs to know the id of the editor where to insert
   the SC to.
 * Or maybe there is another way of fixing it for widgets?
 * Please let me know any tips how this could be achieved, I would hugely appreciate
   it!!!
 * Many thanks,
    Dasha
 * [http://wordpress.org/extend/plugins/shortcoder/](http://wordpress.org/extend/plugins/shortcoder/)

The topic ‘[Plugin: Shortcoder] Plugin is buggy when used with Widgets’ is closed
to new replies.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

## Tags

 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)
 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * 0 replies
 * 1 participant
 * Last reply from: [dashaluna](https://wordpress.org/support/users/dashaluna/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-shortcoder-plugin-is-buggy-when-used-with-widgets/)
 * Status: not resolved