• Resolved Sharon

    (@prettybiddy)


    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)
  • 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

    (@prettybiddy)

    Yes – I think I have you to thank again – also I should create a child theme at some point. Thanks!

    You can download a child theme from the Hueman theme web site. It has a styles.css and functions.php file already defined.

    Thread Starter Sharon

    (@prettybiddy)

    I installed the child theme per instructions, thanks! It doesn’t seem to inherit widget placement but I guess that’s pretty minor :-).

    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

    (@prettybiddy)

    OK, thanks!

    Thread Starter Sharon

    (@prettybiddy)

    I’ll mark resolved.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘related-posts.php’ is closed to new replies.