Insert Link Class is a plugin for WordPress that adds additional classes to the Style dropdown within the WordPress TinyMCE editor.
Installation:
- Download the Insert Link Class Plugin.
- In your WordPress Administration, go to Plugins > Add New > Upload, and select the plugin ZIP file.
- Activate the plugin
- You’ll see a Link Classes option appear on the menu; use this to add, edit and delete custom classes.
Download:



Comments
G’day,
Amazing plugin, made it super easy for me to add custom classes to my editor then all I had to do was add the class to my custom theme.
You should add this to the WordPress.org plugin site.
Thank you,
=-)
Hi Jandal,
The plugin was added to the WordPress Plugin site today, and can be found at http://wordpress.org/extend/plugins/insert-link-class/
Thanks,
Tim.
Hello Tim,
Thank you for this plugin it is a life saver. I found an issue with a WordPress MU install version 2.9.2. Where you define the PLUGIN_ROOT you are replacing everything in dirname(__FILE__) up until root of the plugin name. The plugin was unable to find the include reference to your list.php file. To fix this I removed any replacement of the dirname(__FILE__) path and appended a “/” to the end of the path and it fixed the include reference problem. Seems like this could be a better approach because it references the entire plugin path.
Thanks for the plugin.
Ty
After installing and activating the plug-in, when I go to the settings menu to add some classes, the screen is blank; no options appear? I’m running 2.9.2 via Firefox 3.6.
@Ty – thanks, will get that fixed and update the plugin on WordPress.
@Dennis – either you’re not running PHP5 on your server, you’re not an Administrator of WordPress or the plugin hasn’t activated properly.
I am running PHP Version 5.1.5. I am logged into WordPress via the administrator account. I deactivated and deleted the plug-in. I then grabbed the plug-in again from your website, this time, FTP-ing it to the plug-in directory, then activating it. I get the Settings submenu under the Link Classes menu on the right side. However, when I click the settings option under Link Classes, the content area goes blank; no options to set.
@Dennis – not sure then, first time I’ve heard of that issue. Only other thought is a conflict with another theme or plugin, either using the same action / filter hooks or same constant definition. Also, the plugin can’t be ‘grabbed’ from this site – it’s only hosted on WordPress.org, so I’m not sure what you mean.
Sorry, first time, I installed it via install link from plug-in search inside WordPress. Second time, I downloaded from your link above (yes, WordPress site). I’ll try troubleshooting by deactivating other plug-ins one by one. Thanks.
@Dennis – let me know how you get on and if you find the cause of the issue.
I also had an issue with the PLUGIN_ROOT. I fixed it by changing it to this:
define(PLUGIN_ROOT, WP_PLUGIN_DIR.”/insert-link-class”);
I’m running into the “blank settings page” problem as well. Fresh wordpress install, default theme, no other plugins installed… (However it is installed on a windows server – but it would be nice if it could work there too regardless.)
And actually – tried it on a clean local install (apache) and have the same problem…
@Jennifer – PHP version? WordPress version? Administrator? WordPress Debug info (Google’s your friend on how to output this).
Yes, it would be nice if it worked on Windows servers, but it’s a free plugin I put together to solve a common issue, which means I won’t have tested it on every possible server environment.
If you want a plugin that meets your requirements, you’re going to need to contribute a bit more information and time.
Hi, I installed and have righ PHP, Admin right and updated WP, but when I click on the “Link Classes” Link on the left nav…i get the following error
***************
Warning: include_once() [function.include]: Failed opening ‘/insert-link-class-plugin/list.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/how2buil/public_html/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108
************
Any idea if this is fixable?
Best, Tom
Wicked plugin, thanks for sharing, just what I was looking for!
i got the same error like tom – i could not edit the plugins settings.
somehow strange because the files the plugin allegedly could not include are definitely in the plugins folders
Great idea, but is broken for me…
I’ve PHP 5.2.4
this is what i get on the plugin settings page:
Warning: InsertLinkClassPlugin::include_once(/insert-link-class-plugin/list.php) [function.InsertLinkClassPlugin-include-once]: failed to open stream: No such file or directory in /**MYPATH**/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108
Warning: InsertLinkClassPlugin::include_once() [function.include]: Failed opening ‘/insert-link-class-plugin/list.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /**MYPATH**/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108
Hi Tim,
That’s my problem (looks like 14):
- Everything OK installing your plugin in my 2.9.2
- But when I clic “Link Classes / Settings”, i got this error:
Warning: InsertLinkClassPlugin::include_once(/insert-link-class-plugin/list.php) [function.InsertLinkClassPlugin-include-once]: failed to open stream: No such file or directory in /srv/d_XXXXXXX/www/blog.XXXXXXX.fr/htdocs/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108
Warning: InsertLinkClassPlugin::include_once() [function.include]: Failed opening ‘/insert-link-class-plugin/list.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /srv/d_XXXXXXX/www/blog.XXXXXXX.fr/htdocs/wp-content/plugins/insert-link-class/insert-link-class-plugin.php on line 108
Any idea?
Thanks
Actually, the error mentioned above is very easy to solve. You simply have to rename your plugin folder from “insert-link-class” to “insert-link-class-plugin” as the PLUGIN_NAME is set wrong.
Carmen is correct, it was an easy fix.
define(PLUGIN_NAME, ‘insert-link-class-plugin’); // Plugin programmatic name
Should be
define(PLUGIN_NAME, ‘insert-link-class’); // Plugin programmatic name
The directory isn’t called /insert-link-class-plugin/ there’s no ‘-plugin’
I am also getting the ‘blank screen’ problem. It installed and activated successfully. But when you click on ‘Link classes’ or ‘Settings’ there are no options, just a bank screen.
Was getting the same ‘blank screen’ problem mentioned above (on a Linux server).
Used comment #19 to rectify it – simply change the name of the plugin folder to “insert-link-classlplugin’ and then re-activate it on the admin page.
Thanks Carmen
Hi , thank you for your good plugin ,I found some issues with my hosting services, in the file:
insert-link-class-plugin.php
on lines 87, 91,103,108 remove the PLUGIN_ROOT and the /
from
include_once(PLUGIN_ROOT.’/list.php’);
to
include_once(.’list.php’);
because don’t find the rigth path to the files
my blog link is: http://www.iwillbegreen.com/ and I use your plugin to insert the css class to use fancybox on my pictures links. My server runs in Debian/gnu linux with apache 2 and php5 thank you a lot
Thanks for the feedback everyone – version 1.1 has been released to the WordPress Plugin Directory, which fixes the above issues, and also makes the plugin WordPress 3.0+ compatible.
Either download from http://downloads.wordpress.org/plugin/insert-link-class.zip or update via your WordPress Administration.
Tim.
G’day Tim,
I just updated to the new 1.1 on my WP3.0.1 and the settings page is not working correctly.
Warning: include_once(/home/wp-content/plugins/insert-link-class-plugin/list.php) failed to open stream: No such file or directory
I logged in with ftp to check what’s up, and the plugin directory is not that name
/home/wp-content/plugins/insert-link-class/list.php
I’m not sure if others have had the same issue or not. The classes are still working on the front end, I just can’t use the admin to update anything.
Thanks,
=-)
Thanks for the helpful plugin. The latest version is still broken for me (include_once errors, latest WP). I had to change line 26
from
$this->plugin->name = ‘insert-link-class-plugin’;
to
$this->plugin->name = ‘insert-link-class’;
-Nathan
Version 1.31 has now been released on the WordPress Plugin page, which fixes this error.
Thanks,
Tim.