This free Plugin for WordPress and ClassicPress allows you the usage of #hashtags and @usernames in your posts

Plugin Manual for Smart Hashtags [#hashtagger]

Free Plugin for WordPress and ClassicPress

The Smart Hashtags (formerly hashtagger) Plugin allows you to use #hashtags and @usernames in your posts where a #hashtag links to the corresponding tag archive page and a @username either links to the users profile page or to the users website. It also allows the usage of $cashtags to links to stock quotes.

#hashtags

This plugin uses the Tag system of WordPress resp. ClassicPress to field your post under the desired tags.

When saving a post each #hashtag is added as a “normal” tag – without leading hash – to the post. This makes hashtags fully compatible with existing tags. So there’s no need to change already existing posts created before using the hashtagger Plugin.

When showing a post all #hashtags are automatically converted to links leading to the corresponding tag archive page.

@usernames

The usage of @usernames can be activated optionally.

@usernames can link either to the Users Profile Page or to the Users Website. If the username does not exist the text remains unchanged and no link is created.

Enhance security by usage of @nicknames!

Optionally @nicknames can be used instead of @usernames. This is highly recommended for security reasons!

The username is used to log in to WordPress resp. ClassicPress Backend. Publishing the username on your WordPress site is not the best idea because this tells half of the needed credentials for log in to the public! So do not give away your username, use nickname instead!

For compatibility with plugin versions prior to 2.1 @username is default. It is highly recommended to use @nickname to enhance WordPress security!

Please note that WordPress uses a URL-friendly version of the username for the Users Profile Page URL. So the username is still visible! This is a problem of WordPress and also ClassicPress. Take a look at my smart User Slug Hider plugin which replaces usernames in author pages URLs with 16 digits coded strings to keep usernames secret.

$cashtags

The usage of $cashtags can be activated optionally.

A $cashtag can link to the concerning stock symbol at MarketWatch, Google Finance or Yahoo Finance. Stock symbols can not be validated, using a invalid stock symbol will cause an not found error on the target site.

Examples

GOOG on MarketWatch

GOOG on Google Finance

GOOG on Yahoo Finance

Usage

Just use tags anywhere in your posts.

#hashtag

This adds “hashtag” as tag to the current post and links to the tag archive page for “hashtag” when showing the post.

+#hashtag

Use +#hashtag to only link to a tag archive page without adding “hashtag” as tag to the post. When showing the post the link is showed as “#hashtag” (without “+”). If the tag does not exist the text remains unchanged and no link is created.

##hashtag

Use duplicate ##hashes to tell the plugin that this word should not be converted into a tag. Duplicate hashes are replaced by a single hash when showing the post.

@username

This creates a link either to the Profile Page or the Website of User “username” or optionally “nickname” (see above).

@@username

Use @@username to avoid link creation. When showing the post this is displayed as “@username” without link (@username feature has to be activated).

$cashtag

This creates a link to the concerning stock symbol at MarketWatch, Google Finance or Yahoo Finance ($cashtag feature has to be activated).

$$cashtag

Use $$cashtag to avoid link creation. When showing the post this is displayed as “$cashtag” without link ($cashtag feature has to be activated).

Settings

The Plugins Settings can be found in ‘Settings’ → ‘#hashtagger’. The settings are arranged in ten sections.

Information

Information section - Settings - free WordPress plugin hashtagger

#hashtag Permalinks

This is not a hashtagger settings but a WordPress setting that can be changed in ‘Settings’ → ‘Permalinks’. The default tag base is tag. The current value is shown here for a complete overview. Read more about the usage of Permalinks in the WordPress Documentation.

Tags Settings

Tags section - Settings - free WordPress plugin hashtagger

Allow numeric

Activating this option allows you to use hashtags that start with a number. This also enables hashtags containing only numbers. Please note that all popular social media sites do not allow hashtags to start with numbers. Activating this feature allows you to use hashtags that would not be recognized as a hashtag anywhere else.

This allows you to use hashtagger just to automatically generate tags from #hashtags without showing links to the corresponding tag archive page.

Usernames Settings

Usernames section - Settings - free WordPress plugin hashtagger

Link @usernames

Here you can active the feature to process @usernames. There are four possible settings:

  • Ignore @usernames
  • Link @usernames to users profile page
  • Link @usernames to users website in same browser tab
  • Link @usernames to users website in new browser tab

The website URL can be set in the users profile. If no website URL is set the @username is linked to the users profile page.

@nicknames

Activate this feature to use @nicknames instead of @usernames. This is highly recommended to enhance security! Although using @nicknames is the better option, the default is @usernames for compatibility to plugin versions prior 2.1 (see above).

Cashtags Settings

Cashtags section - Settings - free WordPress plugin hashtagger

$cashtags

Here you can active the feature to process $cashtags. There are seven possible settings:

  • Ignore $cashtags
  • Link $cashtags to MarketWatch in same browser tab
  • Link $cashtags to MarketWatch in new browser tab
  • Link $cashtags to Google Finance in same browser tab
  • Link $cashtags to Google Finance in new browser tab
  • Link $cashtags to Yahoo Finance in same browser tab
  • Link $cashtags to Yahoo Finance in new browser tab

Advanced Settings

Advanced section - Settings - free WordPress plugin hashtagger

Do not delete unused Tags

If you delete a #hashtag the tag is also automatically deleted from the Post. It is not possible to differentiate if a tag was added automatically by the hashtagger plugin or manually by the author (maybe the post was created before using the hashtagger plugin). Therefore all existing tags that are not found as a #hashtag inside the content are deleted on saving a post. If you want to preserve all tags or want to use additional tags please activate this feature.

Process only pages containing a single post

If you enable this option #hashtags (and also @usernames and $chashtags) are not processed within post listings. This for example applies to the blog index page or the archive pages. This solves problems with nested links (see below).

Ignore Blocks

Ignore Blocks section - Settings - free WordPress plugin hashtagger

Ignore text in <code> blocks

If you activate this option, all content in <code> blocks will be ignored both in tag generation in backend and in link generation in frontend.

Ignore text in <pre> blocks

If you activate this option, all content in <pre> blocks will be ignored both in tag generation in backend and in link generation in frontend.

Ignore List

Ignore List section - Settings - free WordPress plugin hashtagger

Here you can define words that should generally be excluded from link generation. You can use #hashtags, @usernames and $cashtags in this list. For #hashtags in the Ignore List also tags are not created.

Post Types Settings

Post Types section - Settings - free WordPress plugin hashtagger

Pages

Activate this feature to also process #hashtags (and optionally @usernames resp. @nicknames) on Pages. If you want to use #hashtags on your Pages please note that WordPress does not show the tags section for pages and also pages are not listed on tag archives. This plugin does not change this behavior of WordPress because there already exist several plugins that add the tag functionality for pages. Please use one of them if you want to tag your pages.

Custom Post Types

Activate this feature to also process #hashtags (and optionally @usernames resp. @nicknames) on Custom Post Types. Please note that it depends on the particular Custom Post Type if the tags section is shown in admin and if posts of that type are listed on tag archive pages.

Posts

#hashtags (and optionally @usernames resp. @nicknames) are processed on Posts. This is the minimum setting and can not be deactivated.

Section Types Settings

Section Types section - Settings - free WordPress plugin hashtagger

Title

Activate this feature to use #hashtags (and optionally @usernames resp. @nicknames as well as $cashtags) inside titles. Please note that when a title is used as link (as on blog index or on archive pages) there are links generated inside links. This may work or not. Nested links are no longer allowed in current HTML versions. Therefore it is recommended to disable processing inside post listings (see above).

Excerpt

Activate this feature to use #hashtags and optionally @usernames resp. @nicknames  as well as $cashtags inside excerpts.

Content

#hashtags (and optionally @usernames resp. @nicknames as well as $cashtags) always are processed inside the content. This is the minimum setting and can not be deactivated.

CSS Style Settings

CSS Style section - Settings - free WordPress plugin hashtagger

CSS class name(s) for #hashtags

This setting allows you to add CSS classes to the generated links for #hashtags.

This setting allows you to add CSS classes to the #hashtag links generated by using the +#hashtag syntax.

CSS class name(s) for @usernames

This setting allows you to add CSS classes to generated links for @usernames resp. @nicknames.

CSS class name(s) for $cashtags

This setting allows you to add CSS classes to generated links for $cashtags.

Please note

The CSS classes must exist in one of the stylesheet files loaded by your Theme. You can add your custom CSS definitions by using one of the Custom CSS Plugins available in the WordPress Plugin Repository or by adding them to the ‘Additional CSS’ section in the Theme Customizer.

Display Settings

Display section - Settings - free WordPress plugin hashtagger

Remove symbols from links

Activating this option removes all symbols (#, @, $) from the links generated in front end.

Add hash symbol to WordPress Tags

If this option is activated the hashtagger plugin automatically adds a hash symbol in front of tags – e.g. when using the Tag Cloud Widget.

Regeneration of all objects

Regeneration of all objects - Settings - free WordPress plugin hashtagger

This function allows you to regenerate all affected objects (Posts, Pages, Custom Posts) using the current settings. Please note that all existing tags that are not found as #hashtag will be deleted if you do not change the regarding setting (see above)!

#hashtag Rules

The hashtag detection follows the rules for hashtags on Twitter, Facebook and Google+. The minimum length for a hashtag is 2 characters. A hashtag must not start with a number (this can be changed optionally). A hashtag not only ends at a space but also at punctuation marks and other special characters. A hashtag may contain underscores.

Theme function

The plugin includes a function for usage in Themes.

do_hashtagger( $content )

This function processes $content by using the current settings. This generates the links to tag archive pages and optionally author profile pages resp. users websites. This function does not add any tags to posts. You can use this function for example to process #hashtags used inside custom fields.

Example

<?php echo do_hashtagger( get_post_meta( get_the_ID(), 'mycustomfield', true ) ); ?>