Blackhole Pro enables you to customize the how the hidden trigger link is displayed on your pages. This tutorial shows you how to do it.

Tutorial

To customize the Blackhole trigger link, follow these steps:

  1. Go to Blackhole settings
  2. For the setting “Trigger Format”, choose “Custom Link”
  3. For the setting, “Custom Trigger”, enter the markup to use for the custom trigger (see below for example)
  4. Click the “Save Changes” button
  5. Tip: you can view the source code of your web pages to view the trigger link

Here is an example to give you an idea of how to customize the trigger link:

<a rel="nofollow" style="display:none" href="[href]">...Put your custom link text here...</a>

This example includes the recommended attributes for the trigger link. Make sure to include the rel="nofollow", style="display:none", and href="[href]" attributes. From there, you can add additional markup and attributes as desired. Also feel free to change the link text to whatever you prefer. Check out the next section for more information about the trigger-link settings.

Trigger Link Settings

Here is more information about the various trigger-link settings provided with Blackhole Pro. Note: this same information is available in the plugin settings, under the “Help” tab (upper-right corner of the screen).

Trigger Format

Defines the format for the blackhole trigger/link. Text displays the default link. Image displays the link using a 1×1 transparent GIF image. Custom trigger may be defined in the next setting.

Default: Default trigger

Trigger Location

Defines the location of the trigger link in the source code of your pages. Currently there are two options, the footer or after the opening body tag. Note that the open-body-tag option requires theme support for wp_body_open(). If in doubt, go with the default option.

Default: Footer

Custom Trigger

Defines a custom link to use for the blackhole trigger. “Custom” must be selected in the previous setting. Can use text/markup plus any of these shortcodes:

  • [text] = Default link text
  • [title] = Default link title attribute
  • [href] = Blackhole URL (includes trigger and nonce)
  • [nonce] = Nonce string (nonce only)
  • [image] = Transparent pixel image (includes markup)

Important: don’t forget to update your robots.txt rules if you change the trigger/URL. Also, make sure to include these attributes if defining a custom link:

rel="nofollow" style="display:none;"

Default: Blank

Custom Keyword

By default the blackhole trigger uses ?blackhole as a query-string parameter in the trigger URL. This setting enables you to change it.

Important if changing the trigger keyword:

  • Do not include any question mark “?” in the custom keyword setting
  • Don’t forget to update your robots.txt rules if you make any changes to the trigger link/keyword/URL
  • Do make sure to use ONLY alphanumeric characters, dashes and underscores for the custom keyword

Default: blackhole

Excluded Pages

Here you can specify any posts or pages that should NOT include the blackhole link. Use post/page IDs, separated by comma. Note: this applies to the blackhole link only; any currently blocked bots will continue to be denied access.

Default: Blank

Related