Simple Short Links

Simple Short Links

from 0$

Simple Short Links is a WP Plugin Package from the Open Source WP Plugins range Adjust the WordPress shortlinks format with an extra settings page.

For more information about a tailored WP Plugin Package like Simple Short Links please contact us directly.

As of WordPress 3.0, most of this plugin’s original features have been incorporated into WordPress itself. WordPress adds shortlinks to most pages by default. This plugin simply adds a settings page where you can easily make some minor adjustments.

WordPress shortlinks are useful for micro-blogging, by using your own domain instead of a 3rd-party short URL service.

The URLs are automatically added to the HTTP and HTML headers of each post, page, attachment, and category.

A template tag enables you to display a human-readable link in addition to the automatically generated headers. Use of human-readable links is highly encouraged, because Google is known to favor them and rank them higher than some longer URLs. This has the effect of boosting the rank of URLs that were deemed “too long” by Google’s standards. Also, in many mobile web browsers, the easiest way for a visitor to find a short link is by seeing it somewhere on the page.

The template tag idea can be extended further with CSS code for print media, which could ensure that each article’s short link URL is printed along with the article. This will make it much easier for the user to return to the article after reading a hard copy.

Theme

Current documentation should be found at Function Reference/the shortlink

Here is a basic reference for the template functions provided by Simple Short Links. WordPress 3.0+ users, see also wp-includes/link-template.php for more details about the_shortlink().

/**
 * Template Tag for Displaying the Short Link
 *
 * Must be called from inside "The Loop"
 *
 * Call like <?php the_shortlink(__('Shortlinkage FTW')); ?>
 *
 * @since 1.1
 * @param string $text Optional The link text or HTML to be displayed.  Defaults to 'This is the short link.'
 * @param string $title Optional The tooltip for the link.  Must be sanitized.  Defaults to the sanitized post title.
 */
function the_shortlink($text = '', $title = '');

A second, similar tag is now available in case you need to display a self-referring short link on a category page.

/**
 * Template Tag for Displaying the Short Link for a Category
 *
 * Should be called from outside "The Loop"
 *
 * Call like <? the_single_shortlink(__('Shortlinkage FTW')); ?>
 *
 * @since 1.3
 * @param string $text Optional The link text or HTML to be displayed.  Defaults to 'This is the short link.'
 * @param string $title Optional The tooltip for the link.  Must be sanitized.  Defaults to the sanitized category name.
 */
function the_single_shortlink($text = '', $title = '');

The CSS Printing Trick

Try adding something like this to your theme’s CSS file to make the URL for the short link appear when printed.

@media print {
 .shortlink a:link:after {
    content: " " attr(href);
 }
}

The CSS example assumes the_shortlink() is used inside of a DIV or P element with a class attribute called “shortlink”.

Download & install the zip archive

The plugin package installer can be downloaded from the WP2E project tab called “code”.

1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.

2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.

3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.

Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.

Simple Short Links

typePlugin
version1.6.1
descriptionAdjust the WordPress shortlinks format with an extra settings page.