Title: Related posts appear on static pages, not just post pages with 4.0.3
Last modified: August 20, 2016

---

# Related posts appear on static pages, not just post pages with 4.0.3

 *  Resolved [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/)
 * After upgrading to version 4.0.3, I have found that related posts appear on static
   pages, not just on posts, when those static pages include posts using shortcodes.
   This didn’t happen before the new release.
 * To see this happen, see my site’s home page at [http://www.TrustworthyCare.com](http://www.TrustworthyCare.com)
 * Everything in the left column on that page after the CTA “Call 1-800-777-4750
   Today for Your FREE In-Home Assessment!” is a post that is used as an include
   file with a shortcode plugin called get posts.
 * Before taking the upgrade, the list of related posts at the end of the page did
   not appear.
 * [http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/](http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/)

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

 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303740)
 * [@tcolling](https://wordpress.org/support/users/tcolling/), go to the YARPP settings
   page and make sure the “automatic display” setting has “pages” turned off.
 *  Thread Starter [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303741)
 * “make sure the “automatic display” setting has “pages” turned off.”
 * Yes, it is. This is really weird.
 * Any other ideas? I had disabled YARPP after I didn’t receive a reply to my post
   after a day or two, but now I’ve re-enabled it so that you can see the effect
   that it has on my home page at [http://www.TrustworthyCare.com](http://www.TrustworthyCare.com)
 * Thanks,
    Tim
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303744)
 * Thanks for turning it on again. My guess is that YARPP is being tricked into 
   thinking that it’s at the end of a post, not the end of a page, because of the“
   get posts” shortcode you’re running to load some other posts. If you turn off
   that shortcode, do they go away? Also, are the related posts listed related to
   your homepage content or to the post(s) that’s pulled in by that shortcode?
 *  Thread Starter [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303745)
 * “My guess is that YARPP is being tricked into thinking that it’s at the end of
   a post, not the end of a page, because of the “get posts” shortcode you’re running
   to load some other posts. If you turn off that shortcode, do they go away? “
 * Yes, they do.
 * “Also, are the related posts listed related to your homepage content or to the
   post(s) that’s pulled in by that shortcode?”
 * It’s a little hard to be sure, but I believe that they’re related to the post
   that is pulled in by the get_posts shortcode. By the way, I have actually replaced
   the get_posts shortcode plugin with a different plugin called “Display Posts 
   Shortcode” plugin, and YARPP still pulls in the same related posts.
 * Here’s a relevant question: I’m using these posts as “include files” if you understand
   what I mean. If I created a custom post type for them, called “includes”, instead
   of just creating them as regular WP Posts, would that trick YARPP into ignoring
   them?
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303746)
 * Could you post a link to this Display Posts Shortcode plugin you’re using? I’d
   like to try to reproduce this issue myself. Thank you!
 *  Thread Starter [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303747)
 * [http://wordpress.org/extend/plugins/display-posts-shortcode/](http://wordpress.org/extend/plugins/display-posts-shortcode/)
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303748)
 * I just tried installing that plugin, but was unable to reproduce this issue. 
   Here’s what I did:
 * 1. Install that plugin
    2. Create a new page 3. In that page, call [display-posts
   tag=’algorithm’] 4. In the published page, those many posts were listed, but 
   YARPP was not.
 * My YARPP settings were “automatic display” on for posts but not pages. What I
   got was the expected behavior.
 * Am I doing something different than you?
 *  Thread Starter [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303749)
 * Hi –
 * I followed the steps in your message above, and I can reproduce the problem. 
   The difference is that I use this set of arguments with the shortcode:
 *  `[display-posts tag="home_page" include_content="true" ]`
 * and it produces the result you can see with the YARPP output, at:
 * [http://www.trustworthycare.com/358-2/](http://www.trustworthycare.com/358-2/)
 * So, it appears that the problem may arise when I use the include_content=”true”
   argument with that shortcode.
 * Does that help you narrow down what could be causing the problem?
 * Thanks! I really appreciate all the time you are taking to look into this.
 * Best regards,
    Tim
 *  Thread Starter [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303750)
 * Any more progress on this problem?
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303758)
 * Hi – I just tried your modification to my test case. I see that each of the posts’
   content is being pulled, including their associated “related posts”. This is 
   expected: within that context, it thinks it’s displaying an archive of posts,
   and I have “automatic display: posts” turned on, with “Also display in archives”
   turned on. If I turn off “Also display in archives”, it will not display on archives
   of posts, and therefore it disappears here too.
 * So, unfortunately, this is expected behavior and I don’t think there’s anything
   on the YARPP side that I’d like to do to circumvent this interaction. I suggest
   you turn off the “Also display in archives” option. You can manually make it 
   so that related posts are displayed in archives by adding the code `related_posts()`
   to your PHP theme files for archives.
 *  Thread Starter [tcolling](https://wordpress.org/support/users/tcolling/)
 * (@tcolling)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303759)
 * Hi Michael –
 * Thank you VERY much for spending so much time looking into this. I really appreciate
   it.
 * One last question: This whole issue arises from my using a special category of
   posts as “include files” on some static pages. If I created a custom post type(
   in the WordPress sense) called something other than “Posts”, would YARPP ignore
   those? I could use a plugin that can display custom post types in order to display
   them on the static pages, if that would prevent YARPP from responding to them.
 *  [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * (@mitchoyoshitaka)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303760)
 * Yes, I think that will work. Just make sure the “automatic display” option is
   not turned on for your new custom post type.

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

The topic ‘Related posts appear on static pages, not just post pages with 4.0.3’
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/)

## Tags

 * [pages](https://wordpress.org/support/topic-tag/pages/)

 * 12 replies
 * 2 participants
 * Last reply from: [mitcho (Michael Yoshitaka Erlewine)](https://wordpress.org/support/users/mitchoyoshitaka/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/new-behavior-bad/#post-3303760)
 * Status: resolved