Adding affiliate marketing information to each post is an effective way to boost revenue when building a website. Use the GeneratePress theme, you can customize it with the Block Element respond in singing Hook feature to easily add affiliate messages to a single post without writing any complex code. In this article, we are going to explain in detail how to add affiliate messages in the WordPress Affiliate marketing information is added to the article and gives you flexible location control.
![图片[1]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517095738805-image.png)
I. Creating a New Block Element
First, enter the GeneratePress Backstage, select Element and create a new Block ElementThe
![图片[2]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517101258917-image.png)
option Hook type to insert content at different locations on the page.
Name your elements for easy management and follow-up.
![图片[3]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517101422106-image.png)
II. Adding container blocks
- In the new Block Element, first add a Container Block(container block).
- Then, insert the container Headline Block(Title block).
- To avoid the default bottom margins affecting the layout, select the div tag instead of the default paragraph Tags.
![图片[4]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517101525471-image.png)
III. Entering affiliate marketing information
exist Headline Block Enter the affiliate marketing message you wish to display in, such as promotional tips or testimonials. This is your content display area, make sure the message is concise and easy to direct visitors to click on.
![图片[5]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517101650309-image.png)
IV. Style Settings
- option Block Navigation(block navigation) in the parent container for styling.
- Set the background color and text color for the container to make the message stand out.
- addable inner margin respond in singing top border, enhancing the visual effect and making the message area more visible.
![图片[6]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102135654-image.png)
V. Selection of display location
Once the style is set, the next step is to choose the display location. You can display the information in:
- All Articles: Displayed at the top of all posts or elsewhere;
![图片[7]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102247338-image.png)
- specific location: e.g. before article content, before title, before article metadata, etc.
![图片[8]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102346338-image.png)
By choosing the right location, you can ensure that the information is displayed where it will be most easily seen.
Select Hook Location
GeneratePress Allows you to insert information into multiple Hook locations. You can choose from the following commonly used Hooks:
- Before Main Content(before content): displays the information before the content of the article;
![图片[9]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102441610-image.png)
- Before Entry Title(before the title): displayed before the title of the article;
![图片[10]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102521466-image.png)
- After Entry Title(after the title): inserted between the title and the content of the article;
![图片[11]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102553472-image.png)
- After Entry Header(after the article header): inserted after the article header (e.g. featured image).
It is recommended to refer to the GeneratePress Hooks Visual Guide Documentationto see all available Hooks Location and method of use.
VII. Reprioritizing Hooks
Each Hook location has a default priority. To ensure that your affiliate marketing messages are displayed in the correct location, you can adjust the priority of the Hook.
For example, if you want information to be displayed in the Featured Image After that, you can increase the priority (e.g. set it to 15) to make sure it comes after the image instead of the default position.
![图片[12]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102745795-image.png)
![图片[13]-在 WordPress 中用 GeneratePress 添加联盟营销信息的完整指南](https://www.361sale.com/wp-content/uploads/2025/05/20250517102835103-image.png)
VIII. Publishing and checking effects
After completing the settings, click post. Then visit the front-end page to ensure that the affiliate information has been successfully displayed in the expected location. If you find that the content is not displaying as expected, you can go back and edit and adjust the settings until you achieve the desired result.
concluding remarks
pass (a bill or inspection etc) GeneratePress developments Block Element respond in singing Hook feature, you can easily add affiliate marketing messages to your website posts and control where they are displayed. Whether it's at the top of the page, in front of the headline, or after the image, you have the flexibility to adjust it so that the message is as effective as possible in attracting users to click on it.
Recent Updates
Link to this article:https://www.361sale.com/en/54903/The article is copyrighted and must be reproduced with attribution.


















![表情[wozuimei]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![表情[baoquan]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments