Indicate External Links

The cubecolour Indicate External Links plugin for WordPress adds an arrow to external http and https links in posts, pages and custom content to indicate when the link target is offsite.

How it works

  • An on-site link looks like this: onsite link
    – unaffected by the plugin and inheriting any styles defined by the theme.
  • An off-site link looks like this: plugin support
    – with an arrow to indicate the offsite link in addition to the styling provided by the theme.

This is a simple plugin which adds a little jQuery script and CSS into the document head. It does not have any options, so there is no admin page.

Customise the Style

Indicate External Links WordPress PluginThe style of the links can be customised by replacing the inbuilt styles with customised version of the CSS rules in a child theme or custom styles plugin. The default CSS output by the plugin can then be removed by adding the following line to the child theme’s functions.php or a custom functions plugin:

<?php remove_action('wp_head', 'cc_extlink_style'); ?>

Your custom styles can define that the arrow is replaced with a specific glyph from a custom icon font used in your theme.

Exceptions

Additional CSS rules with extra specificity can also be added in the same way to add exceptions to prevent the arrow appearing for specific external links. Exceptions for linked images, external links within image captions, and external links in menus are already included in the plugin.

Download

The plugin can be downloaded from the plugins directory at WordPress.org http://wordpress.org/plugins/indicate-external-links

Support

Support for this plugin is provided on the WordPress support forum at http://wordpress.org/support/plugin/indicate-external-links