Archived topic
Adding Content To The Footer Of Every Post
6 replies · Started by johnzoro on May 26, 2020
Hopefully, this is an easy one.
I have a post, and i have a plug in called related posts. this plugin adds a few images with links to related posts.
What i want to do is have some text and a few links before the related posts bit but after the post content
so it would be:
post title
post content
the bit i'm trying to add
related posts
Ideally i would like to be able to just add it once and then it appears on all posts.
Is this easy?
Can i do this with hooks or widgets?
Hi there,
Hooks element would be the way to go:
https://docs.generatepress.com/article/header-element-overview/
Let me know if this helps :)
Yeah kinda, although I still don't really know how to insert it so it's below the content but before the related posts
Hi there,
check the documentation on the Related Posts plugin and see if they provide an option to insert them using a Shortcode or PHP function.
If so you can then add your content followed by the Related posts function in the after_entry_content hook with a priority of 5
Hey sorry for bumping my old thread
yeah so this is the plugin i'm using i think
https://wordpress.org/plugins/related-posts-thumbnails/
can i use html in a hook? what about php?
i fixed it! thanks
Glad to hear that :)