Support » How-To and Troubleshooting » [Resolved] Insert/Edit Link missing "class" dropdown in 3.1

[Resolved] Insert/Edit Link missing "class" dropdown in 3.1

  • After the upgrade to 3.1, it appears we have lost the ability to use the “class” dropdown on the “insert/edit link” pop-up box (available as of 3.0). The new functionality to link to your own pages is great (been looking for that for a long time)!

    But, it would be great to turn the class feature back on, as it was used to highly customize link and button classes vis TinyMCE previously.

    Any way to do it that I’m missing?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Find the “Screen Options” tab in the upper right-hand corner of the screen.

    Ensure that all appropriate checkboxes are checked/enabled.

    WordPress 3.1 decided to hide some of them for you.

    Thanks Chip, but yes, they are all checked.

    This option used to be in the “insert/edit link” pop-up box that appeared when inserting a link in the visual editor, it was not one of the “screen options” boxes.

    Still can’t find anything on the forums, so I’m assuming this little-used feature just disappeared in 3.1?

    If so, please bring it back!

    Sorry, I misunderstood your original post. 🙂

    Let me do some digging. I just noticed that the “target” field was removed, also.

    EDIT: The “target” field was changed to a simple checkbox.

    It appears that the core developers, in their infinite wisdom, decided for you that you no longer need to have the “class” field in the insert link dialog:


    Third pass covers what was discussed in last week’s dev chat:

    All queries are done via AJAX.
    Taxonomies support removed.
    Convert “target” dropdown into an “open in new tab” checkbox.
    Remove “class” dropdown.
    Overload the default ‘link’ button (as per Andrew’s comment above). We should consider #15139 from a UX perspective.
    …plus refactoring and various odds and ends.

    Perhaps it will come back in 3.2?

    Ahh! Thanks Chip.

    Well then, here’s a feature request to the core developers to to add the “class” dropdown back to 3.2.

    There are some people whom are using this to add functionality. See the following thread.

    Arrrrrrrrgh! Seriously??? I’ve got one heavily custom theme that’s had all sorts of issues with WP3.1 upgrade. This one is SUCH a pain. Anybody found any sort of work around?

    Ok, found my own workaround by adding code to the functions file in my theme:

    function custom_options( $opt ) {
    	$opt['theme_advanced_buttons2_add_before'] = "styleselect";
    	$opt['theme_advanced_styles'] = 'Doc Link=doclink';
    	return $opt;
    add_filter('tiny_mce_before_init', 'custom_options');

    This adds a new drop down to the left of the format drop down (the paragraph, h1, h2 one).

    After adding the link you’ll need to select the link of the text and THEN use the drop down to set the style. Instead of adding a class to the A, it wraps the link in a P tag that is given the style (in this case doclink). This means you’ll need to adjust your style sheet. Instead of using a.doclink, you’d use p.doclink a

    Does that help anyone?

    After spending almost 2 hours browsing online, trying to find a solution to get my insert/edit link working again, I finally found it. If you are using the TinyMCE Advanced plugin, Click on its settings, and tick the box that says ‘Advanced Link’ in the Advanced Option Box, it will overwrite the new internal links feature in 3.1 and get it working again. At least it worked for me. Hope this helps 🙂

    BrenFM and stylemywardrobe, thanks for the workarounds. They were both useful solutions.

    I’m marking this post as resolved since we’ve found workarounds, but I’ll add it to the trac as a feature request since the workarounds add complexity the original solution. (Thanks for the original trac number Chip.)
    The feature request is here in the WordPress trac if you’d like to contribute.


    It’s no good that they took this feature out. I used it all the time to help editors style links as buttons and such. What sucks even more is that they didn’t put any hooks in the internal linking dialog. Lame.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Resolved] Insert/Edit Link missing "class" dropdown in 3.1’ is closed to new replies.