• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WPArena

WPArena

WPArena is a premium online resource site of WordPress and is focused on providing excellent WordPress Tutorials, Guides, Tips, and Collections.

  • News
    • Opinion
  • Tutorials
  • Reviews
    • Themes
    • Plugins
  • Comparisons
  • Collections
    • Education Themes
    • Genesis Child Themes
    • Best Responsive Themes
    • Medical WordPress Themes
    • Finance & Business Themes
    • Crowdfunding Themes
  • Resources
    • Inspiration
  • Services
WPArena » Tutorials
Tutorials

How to Convert WordPress Posts Words into Affiliate Links

Avatar of Noor Mustafa Raza Noor Mustafa Raza Updated: January 20, 2017

FacebookTweetPinLinkedInEmailPrint

There are free and premium WordPress Plugins that allow you to automatically replace your post words into affiliates links. Although I am using MaxBlogPress Ninja Affiliate plugin but there is one more excellent Plugin SEO Smart Links which improves the overall SEO strength of your blog by automatic interlinking your content as well as automatically convert keywords you define into (affiliate) links. It can do much more and if you’d like to skip to the full list of features.

SEO Smart Links: Premium WordPress Plugin

seo_smart_links_options

Developed by Vladir Prelovac, a known and respected WordPress SEO expert, SEO Smart Links is one of the most popular SEO plugins for WordPress, used by casual bloggers, Internet marketers and SEO professionals.  Matt Cutts from Google announced that smart internal linking is one of the key strategies for SEO in 2011. Having been downloaded more than 300,000 times to date, SEO Smart Links Premium has been selected as the best keyword affiliate link plugin.

Purchase

SEO Smart Links: Free WordPress Plugin

You can find a free version of this plugin at SEO Smart Links, that can do the same job: SEO Smart Links can automatically link keywords and phrases in your posts and comments with corresponding posts, pages, categories and tags on your blog.

SEO Smart links-wp-plugin

Download

There is an other simple way to replace words by an affiliate link, all you have to add the following code into your function.php file. This is the simple and free way but have limitations and will not give you as much control as the SEO Smart Link plugin. Don’t forget to enter your words/links as shown in the example code.

function replace_text_wps($text){
	$replace = array(
		// 'WORD TO REPLACE' => 'REPLACE WORD WITH THIS'
		'wordpress' => '<a href="#">wordpress</a>',
		'excerpt' => '<a href="#">excerpt</a>',
		'function' => '<a href="#">function</a>'
	);
	$text = str_replace(array_keys($replace), $replace, $text);
	return $text;
}
add_filter('the_content', 'replace_text_wps');
add_filter('the_excerpt', 'replace_text_wps');

This code is courtesy of Kevin Chard from WpSnipp, and we should be thankful to him!

This post was orginally published on: August 27, 2011 and was updated on: January 20, 2017.
FacebookTweetPinLinkedInEmailPrint

Related Stories

  • How to Set Up an Image Gallery in WordPress

    How to Set Up an Image Gallery in WordPress

  • How To Add Twitter Tools Plugin To WordPress

    How To Add Twitter Tools Plugin To WordPress

  • Is Your WordPress Site Mobile-Friendly?

    Is Your WordPress Site Mobile-Friendly?

Avatar of Noor Mustafa Raza

Noor Mustafa Raza

Ex-Editor in chief

I am a WordPress Developer and Designer, author @WPArena. I am providing Free WordPress consultation and can help you to install WordPress in a secure way to small businesses and bloggers.

Reader Interactions

Share Your Thoughts Cancel reply

Before submitting your comment, we kindly ask that you read our comment policy. Your email address will remain confidential and will not be published or shared anywhere. If you subscribe, you will receive notifications regarding new comments.

Primary Sidebar

Content Access Control Management System on WordPress Powered Sites

WordPress Site Was Hacked – How to Protect Yourself

Recent Topics

  • Official Windows 7 Wallpapers
  • How to secure your WordPress images and content from Theft
  • Top 20 Web Designing Companies in the World
  • WP Rocket Review: Is It the Perfect Solution for WordPress Caching?
  • The Complete WordPress Security Guide 2023 – Step by Step

Footer

Top

  • Services
  • Our Themes
  • Facebook
  • Twitter
  • Linkedin

Reviews

  • Beaver Builder Review
  • Beaver Themer Review
  • WP User Frontend Pro
  • Ninja Forms Review
  • MemberPress Review

More Reviews »

Resources

  • Best WordPress Plugins
  • WordPress Permalinks Structure
  • Email Management System
  • Envato Free Files
  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact

Copyright © 2023 · All Rights Reserved · WPArena is a Project of TechAbout LLC.
We are not affiliated with Automattic or WordPress.

  • Advertise
  • Write for us
  • Disclosure
  • Terms
  • Privacy
  • Contact
Share this ArticleLike this article? Email it to a friend!

Email sent!