Title: TinyMCE shortcode button
Last modified: September 1, 2016

---

# TinyMCE shortcode button

 *  [Adendum](https://wordpress.org/support/users/adendum/)
 * (@adendum)
 * [9 years, 12 months ago](https://wordpress.org/support/topic/tinymce-shortcode-button-1/)
 * Is there a way to hide the WP-Members shortcode button that appears in the TinyMCE
   toolbar from all users except Admin?
 * Happy to use a function if anyone has one 🙂
 * [https://wordpress.org/plugins/wp-members/](https://wordpress.org/plugins/wp-members/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Chad Butler](https://wordpress.org/support/users/cbutlerjr/)
 * (@cbutlerjr)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tinymce-shortcode-button-1/#post-7481965)
 * Not currently – but that’s a good suggestion and I’ve added it to the project
   list. Currently, if a user has edit_posts capability, all of the post functions
   are loaded.
 *  Thread Starter [Adendum](https://wordpress.org/support/users/adendum/)
 * (@adendum)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tinymce-shortcode-button-1/#post-7481967)
 * Hi Chad,
 * I have the same issue with RevSlider and I found a hack to hide that but it involves
   commenting out a line of code in Rev Sliders core files, which I’m not happy 
   to do.
 * Ideally a function I can add to the child theme will be fine but a toggle switch
   in WP-Members settings for Admins would be even better! Even better than that
   would be to hide by user role 🙂
 *  Thread Starter [Adendum](https://wordpress.org/support/users/adendum/)
 * (@adendum)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tinymce-shortcode-button-1/#post-7481978)
 * Chad,
 * I found this for someone who had a similar need for a different plugin, could
   I adapt this in someway?
 * > /**
   >  * Hide the shortcode generator from any user below administrator level*
   > [http://gndev.info/kb/how-to-restrict-access-to-shortcode-generator/](http://gndev.info/kb/how-to-restrict-access-to-shortcode-generator/)*/
   > update_option( ‘su_generator_access’, ‘administrator’ );
 *  Thread Starter [Adendum](https://wordpress.org/support/users/adendum/)
 * (@adendum)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/tinymce-shortcode-button-1/#post-7482021)
 * Chad,
 * This works… I am hiding WP-Members, Rev Slider and the Yoast SEO elements from
   the Publish meta box.
 * // Hide elements from all but Admins
    function uyf_custom_admin() { global $user_level;
   if ($user_level != ’10’ ) { echo ‘<style type=”text/css”> .score-text, .yoast-
   logo.svg.na, div#mceu_15, div#mceu_16 {display:none;} </style>’; } }
 * add_action(‘admin_head’, ‘uyf_custom_admin’);

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘TinyMCE shortcode button’ is closed to new replies.

 * ![](https://ps.w.org/wp-members/assets/icon-256x256.png?rev=1226414)
 * [WP-Members Membership Plugin](https://wordpress.org/plugins/wp-members/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-members/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-members/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-members/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-members/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-members/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [Adendum](https://wordpress.org/support/users/adendum/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/tinymce-shortcode-button-1/#post-7482021)
 * Status: not resolved