Automattic / Automattic/jetpack

Related Posts tag/category/taxonomy filtering not always correct

Open
#3,280 4 comments 0 reactions 0 assignees View on GitHub
[Feature] Related Posts [Feature] Search [Pri] Low [Status] Search Index Change Bug General
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

We provide methods for filtering related posts by tag/category/custom_taxonomy using the slug: https://github.com/Automattic/jetpack/blob/master/modules/related-posts/jetpack-related-posts.php#L583

But unfortunately the syncing of terms to wp.com will not necessarily result in the same term slug on wp.com as is used on the original site. This is partly a problem with syncing, and partly a problem with the way we are running the filter.

An example occurs with this plugin https://wordpress.org/support/topic/polylang-and-related-posts-plugin?replies=4

In that case the custom taxonomy has terms like "Deutsch" which wp.com creates a slug of "deutsch", while the plugin has a slug of "de".

Completely fixing this also requires wp.com to move away from having a global taxonomy (which is eventually the plan).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.