- Home
- Knowledge Base
- Configuration
- Keyword & URL Replacements
Keyword & URL Replacements
Keyword Replacements Video Tutorial:
URL Replacements Video Tutorial:
What is Keyword & URL replacement?
This is one of the biggest features Pretty Links has to offer. With Keyword replacements, you can specify certain Keywords or URL's when creating/editing a Pretty Links. Any time that Keyword or URL is encountered on a Page, Post, Feed, CPT, or Comment. Pretty Links will replace it with your Pretty Links. Additionally Pretty Links can scan your entire site, and convert all non-Pretty Links URL's into Pretty Links URL's. The best part is that this is not permanent, once you deactivate Pretty Links, all those links go back to how they were before.
Set Keyword Replacement Thresholds
Let's say you want to replace the Keyword “Money” with a Pretty Links. Without setting a threshold Pretty Links will replace every single instance of “Money” on your site with that Pretty Links. This may not only be annoying to your users, but can also impact the performance of your site. It is recommended that you set a threshold to prevent too many Keywords from being replaced at one time. Note: Pretty Links replaces the Keywords randomly on the page. You cannot specify which instances of a word will, or will not be replaced.
Open in new Window
Enabling this option will add the target=”_blank” attribute to all links that are automatically replaced with Pretty Links. This attribute, tells the web browser(s) to open that link in a new Window or a new Tab. It is recommended that you enable this feature.
Add Nofollows
Adding nofollow to the links is recommended unless you are using the 301 type redirect for the links. Nofollow means that search engines should not follow or index that URL. It is recommended that you enable this feature, unless you're an SEO expert and know what you're doing.
Custom CSS
You can specify regular and hover CSS styling for your Keyword Pretty Links replacements. Let's say you wanted to make all of the Keywords replaced show up as a Navy Blue and Bold link – and you wanted them to turn Red when hovered over. You would simply type those CSS attributes into the text field. See the image below for an example of how this data should be entered.
Link to Disclosure
This feature allows you to add a disclosure link to the top, bottom, or both, of any page, post, or custom post type on your site that uses Keyword or URL Replacements. To learn more, please reference this page.
Keyword Disclosures
Enable this option to add an affiliate link disclosure next to each one of your keyword replacements. Use the text box to customize how you would like this to appear. Note: This does not apply to url replacements, only keyword replacements, and your link does not have to an affiliate link for this option to work. When enabled it will look like this:
Replace All URLs
If you enable this option, Pretty Links will scan your entire site and convert all non Pretty Links URL's into Pretty Links. If you have around 8,000+ non Pretty Links URL's on your site, it may not be a good idea to enable this feature as it can cause performance issues. This feature is somewhat reversible. When you disable it, all the links return to normal. However, they will still be listed as Pretty Links in the Pretty Links list.
Note: If you would like to blacklist links that direct to certain domain names you can enter them here beginning as http:// or https:// and without any other /'s or text after the domain name. If you enter them incorrectly they will be removed from the list after saving your options. Here is an example of what it should look like:
Replace in Comments
Enabling this option will cause Keywords and URL's in your comments to be replaced as well, instead of just Pages, Posts, and CPT's.
Replace in Feeds
Enabling this option will cause Keywords and URL's in your feeds to be replaced as well, instead of just Pages, Posts, CPT's and Comments if the above option is enabled.
Index Replacements
This feature will index all of your keyword & URL replacements to dramatically improve performance. If your site has a large number of replacements and/or posts then this feature may increase the load on your server temporarily and your replacements may not show up on your posts for a day or two initially (until all posts are indexed). If you're already using a page caching plugin like W3TC, or using a CDN, or even if your web host does page caching for non-logged in users – then this feature may add no benefit to what you're already doing. NOTE: this feature requires the use of wp-cron.