Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Linkify Text

Automatically hyperlink words or phrases in your posts.

Does this plugin modify the post content in the database?

No. The plugin filters post content on-the-fly.

Will this work for posts I wrote prior to installing this plugin?

Yes, if they include terms that you have defined to be linkified.

What post fields get handled by this plugin?

By default, the plugin filters the post content, post excerpt fields, widget text, and optionally comments and comment excerpts. You can use the 'c2c_linkify_text_filters' filter to modify that behavior (see Filters section). There is a setting you can change to make text linkifications apply to comments as well.

Is the plugin case sensitive?

By default, yes. There is a setting you can change to make it case insensitive. Or if you are a coder, you can use the 'c2c_linkify_text_case_sensitive' filter (see Filters section).

What if the word or phrase is already linked in a post?

Already linked text will not get linked again by this plugin (regardless of what the link may be).

Will all instances of a given term be linked in a single post?

By default, yes. There is a setting you can change so that only the first occurrence of the term in the post gets linked. Or if you are a coder, you can use the 'c2c_linkify_text_replace_once' filter (see Filters section).

Is there an efficient way to link multiple terms to the same link without repeating the link in the settings field (which can be tedious and prone to errors)?

Yes. You can reference another term by specifying its link as another term in the list prepended with a colon (':'). For instance:

WP => https://wordpress.org,
WordPress => :WP
dotorg => :WP

Given the above terms to link, all terms would link to 'https://wordpress.org'. The latter two all reference the link used for the term "WP".

NOTE: The referenced term must have an actual link defined and not be a reference to another term. (Basically, nested references are not currently supported.)

How can I get text linkification to apply for custom fields (or something not linkified by default)?

You can add to the list of filters that get text linkified using something like this (added to your theme's functions.php file, for instance):

 * Enable text linkification for custom fields.
 * @param array $filters Array of filters that the plugin should hook.
 * @return array
function more_text_replacements( $filters ) {
    $filters[] = 'the_meta'; // Here you could put in the name of any filter you want
    return $filters;
add_filter( 'c2c_linkify_text_filters', 'more_text_replacements' );

Can I only have text linkification take place for only a part of a post (such as text inside certain tags, or except for text in certain tags)?

No. The plugin applies fully to the post content. With some non-trivial coding the plugin could be utilized to affect only targeted parts of a post's content, but it's not something that will be built into the plugin.

Can I change how the link gets created because I want to add a 'title' attribute to the link?

Yes, with a bit of code. You can define the title attribute text in your replacement string, like so:

WP => https://wordpress.org || This is the link title

Now the code:

function add_title_attribute_to_linkified_text( $display_link, $text_to_link, $link_for_text, $text_to_link ) {
    // The string that you chose to separate the link URL and the title attribute text.
    $separator = ' || ';

    // Only change the linked text if a title has been defined
    if ( false !== strpos( $link_for_text, $separator ) ) {
        // Get the link and title that was defined for the text to be linked.
        list( $link, $title ) = explode( $separator, $link_for_text, 2 );

        // Make the link the way you want.
        $display_link = '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $title ) . '">' . $text_to_link . '</a>';

    return $display_link;
add_filter( 'c2c_linkify_text_linked_text', 'add_title_attribute_to_linkified_text', 10, 4 );

Does this plugin include unit tests?


Requires: 4.1 or higher
Compatible up to: 4.5.6
Last Updated: 8 months ago
Active Installs: 1,000+


3.6 out of 5 stars


0 of 3 support threads in the last two months have been marked resolved.

Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.