Title: Custom Hooks
Last modified: August 21, 2016

---

# Custom Hooks

 *  [TheArtofRetouching](https://wordpress.org/support/users/theartofretouching/)
 * (@theartofretouching)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-hooks/)
 * I used the following code, but it is not displaying with or without the PHP part.
   Think I need to add something else? I have a theme that lets me add this to one
   post type, but not another. My goal is to use this on the Free Posts, but not
   the Membership Related Posts. So, I need Shortcode to tell it when to display.
   Thanks.
 * <?php related_posts(); ?>
 * [https://wordpress.org/plugins/yet-another-related-posts-plugin/](https://wordpress.org/plugins/yet-another-related-posts-plugin/)

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

 *  Plugin Author [YARPP](https://wordpress.org/support/users/jeffparker/)
 * (@jeffparker)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-hooks/#post-5079822)
 * I’m seeing related posts on [http://www.theartofretouching.com/blog/photoshop-tutorial-jps_vs_raw_file_formats#.U71FfbG8RfY](http://www.theartofretouching.com/blog/photoshop-tutorial-jps_vs_raw_file_formats#.U71FfbG8RfY).
   Is this your site? Are you using the “Automatically display” checkbox or the `
   related_posts()` code?
 *  Thread Starter [TheArtofRetouching](https://wordpress.org/support/users/theartofretouching/)
 * (@theartofretouching)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-hooks/#post-5079855)
 * It’s on automatic right now. If I uncheck that box, and put on the code, it stops
   working. So, me first question was if that code was correct? Or if there is some
   alteration I should be using instead.
 *  Plugin Author [YARPP](https://wordpress.org/support/users/jeffparker/)
 * (@jeffparker)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-hooks/#post-5079864)
 * Yes, if it’s working with “Automatic” checked, then you should be able to turn
   off that checkbox and add that exact code within [The Loop](http://codex.wordpress.org/The_Loop)
   where you want to display the related posts (usually `single.php`).

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

The topic ‘Custom Hooks’ is closed to new replies.

 * ![](https://ps.w.org/yet-another-related-posts-plugin/assets/icon-256x256.png?
   rev=2549977)
 * [YARPP - Yet Another Related Posts Plugin](https://wordpress.org/plugins/yet-another-related-posts-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yet-another-related-posts-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yet-another-related-posts-plugin/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [YARPP](https://wordpress.org/support/users/jeffparker/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/custom-hooks/#post-5079864)
 * Status: not resolved