Just about me, and stuff...

Subscript and Superscript

A short code snippet to show hidden buttons in the WordPress editor toolbar.

This bit of code is useful for sites that use referencing.  Buttons for sub & superscript are hidden by default in the WordPress editor.


The code below, if added to your themes functions.php file, will show the buttons on the second line of the text editor in WordPress.


function my_mce_buttons_2( $buttons ) {	
	 * Add in a core button that's disabled by default
	$buttons[] = 'superscript';
	$buttons[] = 'subscript';

	return $buttons;
add_filter( 'mce_buttons_2', 'my_mce_buttons_2' );



More information here on the WordPress codex.