Attention! This script is available only in versions of the plugin up to 1.x.
The Travelpayouts plugin for WordPress has a special script that automatically inserts links into articles. Using it, you can specify certain words or phrases (for example, the names of countries, airlines, and so on) into which links will automatically be inserted.
Creating rules for automatic links
To create a link insertion rule, go to the Link Insertion section in the plugin settings.
To add a new automatic link, click the Add Link button.
Fill in the following fields in the pop-up window:
- Link — A link that will be opened when clicking on the anchor phrase (this can be either a link to the advertiser’s website with your affiliate marker, or a link to another page of your website)
- Anchor phrases — Words or phrases that will be automatically replaced by words with links. You can add any number of words/phrases by separating them with commas
- Events onclick — In this field, you can add Google Analytics or Yandex Metrika events that will be triggered when clicking on a link
In addition, you can select one of the following settings for each link:
- Add «nofollow» attribute — This automatically closes links from being scanned by search engines
- Replace existing links — If you select this item and click Save changes, the script will go through all the articles on the website and add links to the obtained anchor phrases. Please note! It is recommended to make a backup of the database before using this functionality
- Open in a new tab — All links will open in a new window/tab
Advanced settings for automatic links
In the main section, you can select the following settings:
- Don’t add links to all titles — Links will not be added to words if they are in the H1, H2 headings and so on
- Enable auto-links for new posts — Automatically insert links to all new posts when you click the Post button
- Anchor replacements limit — A parameter that determines how many times the anchor phrase will be replaced in the text. For example, if the phrase «the best travel affiliate program» appears four times in the text, and this parameter is assigned the number two, the link will be inserted only in the first two phrases
- Place auto-links in all existing posts — Run the script according to the added rules so that it inserts links in previously created posts. Please, note! It is recommended to make a backup of the database before using this functionality
You can also delete selected links, upload all created links to a file, or import them from a CSV file into a list.
Was this article helpful?
Have more questions? Submit a request