Archived topic
Is there a way to input some text and links automatically below every post?
7 replies · Started by Wayne on April 22, 2021
So I want to do something like this:
Is there a way to create a square, add some useful information inside the square, and have it be shown below every single post that I have created?
I want to put some affiliate links like the one in the screenshot and was wondering if there is a way to do so?
Hi there,
use a Block Element with the GenerateBlocks plugin.
The GB plugin will allow you to create that design in a Block Element then select Hook: generate_after_content and set the Display Rules to Posts > All Posts.
So I did that, and it is currently putting the block on the very bottom of the page.
Is there a way I can make the block appear right after my last text and above the tags?
Try the generate_after_entry_content hook with priority of 3.
ah that works perfectly! Thank you!
Now only 1 question left. How do I make the links no-follow? I don't see a way where I can make the affiliate links I put inside to no-follow.
Now only 1 question left. How do I make the links no-follow? I don’t see a way where I can make the affiliate links I put inside to no-follow.
It depends on how the links were rendered. If it's something you did with custom HTML, you can simply edit the code to add rel="nofollow" to your <a> tags.
Is it generated by the plugin? If yes, you should ask the plugin developer if they have filters or hooks for their links.
You can also add the rel="nofollow" attribute by script.
Example:
https://stackoverflow.com/a/58220301
You can be more specific with your code than this.
thank you ! that works =)
No problem. :)