Closed MarinescuLucia closed 1 year ago
Hello @MarinescuLucia,
I've added this feature request to this PR https://github.com/Codeinwp/hestia-pro/pull/2465, please review it and let me know if there are any problems.
If some users want to disable this feature just add the below filter in the active theme functions.php file.
add_filter( 'hestia_related_posts_by_yoast_primary_term', '__return_false' );
Thanks
@girishpanchal30 Tested both the PR and the filter to disable the feature and everything works properly for me. Thank you!
@girishpanchal30 Tested and the issue is still not fixed for me, there still are posts with different primary category in the related posts section, you can check here:
Admin area URL: https://hestia-issues.s4-tastewp.com/music/sed-nimis-multa/
Username: irinel
Password: Oj30xh1tegw
@irinelenache The music category is applied to all 3 related posts. so the related posts will show it.
@irinelenache I think I didn't explain this very clearly when I created the issue and we tested different things. The suggestion made by the user was to display only related posts that have a category that is the same as the primary category for the current post. But those related posts don't need to have that category assigned as primary too, they just need to have it among the categories assigned.
Sorry for the confusion, I may have gotten confused too! :D
@girishpanchal30 @MarinescuLucia I thought only posts with the same primary category should be visible in the related posts section, sorry for misunderstanding. Everything's fine then, will move this to Ready to merge 🚀
Yoast has a feature that allows the user to select a primary category if multiple categories are assigned to a post. Currently, if a post has more categories assigned and one of those is set as the primary category in Yoast, posts from all the categories are displayed in the related posts section from the single post page. One user mentioned that it would be an improvement if only posts from that primary category could appear in the related posts section if a primary category is selected in Yoast.
Suggested here.