• WordPress

    Posted on November 11th, 2010

    Written by Jeremy


    , , , , , , ,

    Learnthat.com provides a variety of free tutorials – some the length of courses – and I am frequently using the <!–nextpage–> tag to insert a page within a longer tutorial. One of my goals before the end of the year is to improve the UI and efficiency of posting tutorials so that I can speed up the time of delivery for content. Adding in <!–nextpage–> isn’t a huge amount of time, but having to go into the HTML editor, find all of the breaks and do it is a waste of time when I could do it through the WYSIWYG editor within the WordPress posting area.

    So, I decided to finally fix the problem. You could install a plugin to do this for you, but I like to keep my list of plugins as limited as possible to reduce potential for conflicts. Since this is a small problem (the nextpage button already is present within WordPress, it was removed to reduce clutter), I decided to go find some code to place in the functions.php. If you copy and paste this code into functions.php, your <!–nextpage–> button will return to the toolbar.

    <pre><code>function wysiwyg_editor($mce_buttons) {
    $pos = array_search(‘wp_jerm665_more’,$mce_buttons,true);
    if ($pos !== false) {
    $tmp_buttons = array_slice($mce_buttons, 0, $pos+1);
    $tmp_buttons[] = ‘wp_jerm665_page’;
    $mce_buttons = array_merge($tmp_buttons, array_slice($mce_buttons, $pos+1));
    return $mce_buttons;

    This entry was posted on Thursday, November 11th, 2010 at 10:26 am and is filed under WordPress. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

    Take a look at some of the responses we have had to this article.

  • Leave a Reply

    Let us know what you thought.

  • Name(required):