Support » Fixing WordPress » Theme's shortcodes no longer working with WP3.9

  • My theme is no longer supported by the developer, so I am wondering if someone can help me figure out how to get my WYSIWYG shortcode buttons to work again?

    Despite looking like they would work in my custom-functions.php file, it didn’t work.

    Any help would be appreciated, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You need to include as much information as possible. Providing the theme name, site URL and examples of failing code would be a start.

    Hi, the theme name is named “Newsroom” and can be found at themeforest.

    The site is HCW PC Gaming Reviews

    The code is in a separate theme file called “theme_shortcodes.php” and these are the contents:

    [ 697 lines of code moderated, that’s just way too much. For that many lines of code please use instead. ]

    The shortcodes work fine on the site, I just lost the shortcuts to them in the WYSIWYG editor. This makes it difficult, since I can’t remember how they are structured.

    The move to version 4 of TinyMCE in WordPress 3.9 has had an effect on plugins and themes that add buttons to the editor tool bar. I noticed that you’d posted a support thread at your commercial theme designer’s site, it’s a shame they’re being unresponsive.

    I found this page at wpexplorer where adding items to the new tool bar is discussed:

    Maybe you can replace your old buttons that way.

    I’m not exactly a programmer, but it looks like the code is the same as what he’s using.

    His example:

    // Register new button in the editor
    function my_register_mce_button( $buttons ) {
        array_push( $buttons, 'my_mce_button' );
        return $buttons;

    My theme:

    // Add TinyMCE buttons
    function wpbandit_mce_buttons($buttons) {
    	array_push($buttons, 'separator', 'wpbandit_button');
    	return $buttons;

    His example to call the javascript:

    // Declare script for new button
    function my_add_tinymce_plugin( $plugin_array ) {
    	$plugin_array['my_mce_button'] = get_template_directory_uri() .'/js/mce-button.js';
    	return $plugin_array;

    My theme:

    // Add TinyMCE plugins
    function wpbandit_mce_plugins($plugin_array) {
    	$plugin_array['wpbanditShortcodes'] = get_template_directory_uri() . '/air/theme/tinymce/tinymce.wpbandit.js';
    	return $plugin_array;

    Could the problem be that my theme is using different PHP files other than functions.php to call the buttons? It has several other files it uses in a subdirectory of the main theme.


Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Theme's shortcodes no longer working with WP3.9’ is closed to new replies.