Soliloquy Documentation

Documentation, Reference Materials, and Tutorials for Soliloquy

Add rel=”nofollow” to Image Links

Would you like to add nofollow links to image links in Soliloquy? You can easily do this by installing a custom plugin on your site! We’ll walk you through how to add nofollow release tags to your slider images.

Note: This tutorial is a bit more technical than our other docs, but we’ll walk you through the process step by step. In order to add the nofollow release tags, we’ll need to create and upload a basic WordPress plugin.


Creating the Plugin

To create this custom query filter, just add the following code to a new file at wp-content/plugins/soliloquy-nofollow-image-links.php.

[php]<?php
/**
* Plugin Name: Soliloquy – No Follow on Image Links
* Plugin URI: https://soliloquywp.com
* Version: 1.0
* Author: Soliloquy Team
* Author URI: https://soliloquywp.com
* Description: Adds ‘nofollow’ to image links
*/
add_filter( ‘soliloquy_output_link_attr’, ‘tgm_soliloquy_rel_nofollow’ );
function tgm_soliloquy_rel_nofollow( $attr ) {

return $attr .= ‘ rel="nofollow"’;

}[/php]

If you’re unsure how to create a plugin file, follow these steps below:

  1. Open a text file and make sure that it is a plain text document. You can use a plain text editor like Notepad or a code editor of your choice.
  2. Next, copy and paste the code shown above into the file and save the file as soliloquy-nofollow-image-links.php
  3. Once you’ve saved the file you can easily upload this directly to your /plugins directory on your server using FTP or you can right-click on the text document and zip (or compress).
  4. Finally, log in to your WordPress dashboard and go to Plugins » Add New » Upload Plugin and upload the .zip file you just created in the previous step.

Activate the Plugin

Your next step is to activate the plugin you just uploaded. Simply navigate to the Plugins from within your WordPress dashboard and activate the Soliloquy – No Follow on Image Links plugin.

Activate the nofollow image links plugin

You’ve now successfully added the nofollow to your slider image links.

Would you like to add some HTML to your slides. Check out our tutorial on How to Add Custom HTML to Slides.