@rfischmann
You can use ampforwp_after_post_content
hook to insert the content right after the post.
Could you please give me a code example, @ahmedkaludi? I’m not an expert programmer. Thanks!
@rfischmann
Sure, There’s one very similar tutorial on this: https://ampforwp.com/tutorials/article/extend-amp-plugin/
which will help you perfectly!
Thanks, that worked!
Now, I can’t see an option to disable your plugin’s related posts feature. How do I do that, please?
Is that the only hook available? I’d rather have my custom code appear towards the end of the page (after the date), not right after the post’s content.
Cheers.
@rfischmann
No, there are many hooks available,
If you are using Design one, two or three, then follow this: https://ampforwp.com/list-hooks-ampforwp-plugin/
If you are using Swift theme, then use: https://ampforwp.com/tutorials/article/hooks-amp-theme-framework/
That should help you.
Are you sure that’s the right URL for Swift, @ahmedkaludi?
I don’t see any hook there that suits my needs of where I want the code to run — which is below the previous/next navigation links.
The previous one you told me, ampforwp_after_post_content
, isn’t even mentioned there…
Hi @rfischmann
“ampforwp_after_post_content” is a different one.
Okay, Can you just share the URL of your website and exact position, I’ll send you the exact hook or the code.