Enabling hidden MCE buttons

Discussion in 'BizWay WordPress Theme' started by iosadmin, Aug 16, 2017.

  1. iosadmin

    iosadmin New Member

    Joined:
    Sep 12, 2016
    Messages:
    15
    Likes Received:
    0
    How can I enable the hidden MCE buttons for subscript and superscript?
     
  2. akbar92

    akbar92 Support Staff Staff Member

    Joined:
    Jun 3, 2017
    Messages:
    2,318
    Likes Received:
    49
    Hello,

    To add subscript(sub) and superscript(sup), Just add the code below to functions.php

    Code:
    function enable_mce_buttons( $buttons ) {
    $buttons[] = 'superscript';
    $buttons[] = 'subscript';
    return $buttons;
    }
    add_filter( 'mce_buttons_2', 'enable_mce_buttons' ); // adds on second row of Editor
    
    Notice the filter mce_buttons_2. It enforces buttons to display on second row of Editor. mce_buttons_3 likewise displays the buttons on the third line.

    Hope you find above solution helpful.

    Thanks & Regards,
    Akbar
    InkThemes.com
     
  3. iosadmin

    iosadmin New Member

    Joined:
    Sep 12, 2016
    Messages:
    15
    Likes Received:
    0
    Very helpful! Thanks again. I really appreciate all the help!
     
  4. akbar92

    akbar92 Support Staff Staff Member

    Joined:
    Jun 3, 2017
    Messages:
    2,318
    Likes Received:
    49

Share This Page