Title: Custom code after posts
Last modified: March 17, 2018

---

# Custom code after posts

 *  [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * (@rfischmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/)
 * I need to add some custom AMP code right after posts, which I’ll use instead 
   of the plugin’s built-in related posts feature.
 * How do I do that?
 * Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10090057)
 * [@rfischmann](https://wordpress.org/support/users/rfischmann/)
 * You can use `ampforwp_after_post_content` hook to insert the content right after
   the post.
 *  Thread Starter [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * (@rfischmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10090220)
 * Could you please give me a code example, [@ahmedkaludi](https://wordpress.org/support/users/ahmedkaludi/)?
   I’m not an expert programmer. Thanks!
 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10093670)
 * [@rfischmann](https://wordpress.org/support/users/rfischmann/)
 * Sure, There’s one very similar tutorial on this: [https://ampforwp.com/tutorials/article/extend-amp-plugin/](https://ampforwp.com/tutorials/article/extend-amp-plugin/)
 * which will help you perfectly!
 *  Thread Starter [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * (@rfischmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10094724)
 * Thanks, that worked!
 * Now, I can’t see an option to disable your plugin’s related posts feature. How
   do I do that, please?
 *  Thread Starter [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * (@rfischmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10094801)
 * 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.
 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10098330)
 * [@rfischmann](https://wordpress.org/support/users/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/](https://ampforwp.com/list-hooks-ampforwp-plugin/)
 * If you are using Swift theme, then use: [https://ampforwp.com/tutorials/article/hooks-amp-theme-framework/](https://ampforwp.com/tutorials/article/hooks-amp-theme-framework/)
 * That should help you.
 *  Thread Starter [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * (@rfischmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10101543)
 * Are you sure that’s the right URL for Swift, [@ahmedkaludi](https://wordpress.org/support/users/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…
 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10110735)
 * Hi [@rfischmann](https://wordpress.org/support/users/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.
 *  Thread Starter [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * (@rfischmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10110777)
 * Sure, here’s a URL:
 * [https://macmagazine.com.br/2018/03/24/topicos-do-mm-forum-carregador-sem-fio-para-iphone-8-x-tela-amarelada-bloqueio-de-imei-e-mais/amp/](https://macmagazine.com.br/2018/03/24/topicos-do-mm-forum-carregador-sem-fio-para-iphone-8-x-tela-amarelada-bloqueio-de-imei-e-mais/amp/)
 * I want the custom to code to appear right after the posts’ navigation, before
   Disqus.
 *  Thread Starter [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * (@rfischmann)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10132869)
 * [@ahmedkaludi](https://wordpress.org/support/users/ahmedkaludi/) Help here?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Custom code after posts’ is closed to new replies.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * 10 replies
 * 2 participants
 * Last reply from: [Rafael Fischmann](https://wordpress.org/support/users/rfischmann/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/custom-code-after-posts/#post-10132869)
 * Status: not resolved