Title: related-posts.php
Last modified: August 31, 2016

---

# related-posts.php

 *  Resolved [Sharon](https://wordpress.org/support/users/prettybiddy/)
 * (@prettybiddy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/)
 * Hi – I asked this same question last year and got a good solution in reply. I
   just updated to the latest version of Hueman and the code has changed a lot and
   I can’t use this solution.
 * How would I modify related-posts.php function to exclude certain Categories from
   the related posts? I use the related by Tag option to show posts related by Tag
   underneath a post. I would like to exclude blog posts that match in 2 Categories
   from being shown. How would I tweak the code to do that?
 * I think the solution goes in hu_related_posts function but I don’t know where
   that is.
 * Thank you.

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

 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292284)
 * Hi Sharon. The hu_related_posts() function is in /functions/init-front.php. With
   the exception of a couple of option name changes the function itself hasn’t changed.
   You should be able to copy that function into your child theme and apply the 
   same modifications you made previously. Does that help?
 *  Thread Starter [Sharon](https://wordpress.org/support/users/prettybiddy/)
 * (@prettybiddy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292332)
 * Yes – I think I have you to thank again – also I should create a child theme 
   at some point. Thanks!
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292335)
 * You can download a child theme from the [Hueman theme web site](http://presscustomizr.com/hueman/).
   It has a styles.css and functions.php file already defined.
 *  Thread Starter [Sharon](https://wordpress.org/support/users/prettybiddy/)
 * (@prettybiddy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292442)
 * I installed the child theme per instructions, thanks! It doesn’t seem to inherit
   widget placement but I guess that’s pretty minor :-).
 *  [bdbrown](https://wordpress.org/support/users/bdbrown/)
 * (@bdbrown)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292444)
 * That’s because menus and widgets are theme-dependent; i.e. each theme configures
   menus and widgets with their own unique IDs. When you change themes the new theme
   most likely won’t use the same IDs as the previous theme so it appears that your
   menus and/or widgets are “missing”. You just need to go in and reset them in 
   the new theme.
 *  Thread Starter [Sharon](https://wordpress.org/support/users/prettybiddy/)
 * (@prettybiddy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292475)
 * OK, thanks!
 *  Thread Starter [Sharon](https://wordpress.org/support/users/prettybiddy/)
 * (@prettybiddy)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292478)
 * I’ll mark resolved.

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

The topic ‘related-posts.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hueman/3.7.27/screenshot.png)
 * Hueman
 * [Support Threads](https://wordpress.org/support/theme/hueman/)
 * [Active Topics](https://wordpress.org/support/theme/hueman/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hueman/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hueman/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Sharon](https://wordpress.org/support/users/prettybiddy/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/related-postsphp/#post-7292478)
 * Status: resolved