Title: [Plugin: All Related Posts] wp_ database prefix hardcoded
Last modified: August 20, 2016

---

# [Plugin: All Related Posts] wp_ database prefix hardcoded

 *  Resolved [max_Q](https://wordpress.org/support/users/max_q/)
 * (@max_q)
 * [15 years ago](https://wordpress.org/support/topic/plugin-all-related-posts-wp_-database-prefix-hardcoded/)
 * Hi,
 * function related_tag_posts and function related_search_tag_posts have a leftover“
   wp_posts.ID” as part of the query, so since my site has different table prefixes
   plugin was returning nothing.
 * Even after fixing the query, I am not convinced about the results.
    Test Case:
 * Using only “posts related to the shown post” and “posts related to seach engine
   terms (tags and categories)”.
 * Two test posts that are in the same category and share one tag.
 * Clicking on post “a” shows post “b” in the widget, as expected. Clicking on post“
   b”, however, does not show post “a”. Other posts, not in the same category, but
   with one tag in common with post “b” are shown.
 * Are you factoring in categories? In my usage categories carry much more weight
   than tags and I would expect two posts in the same category with a matching tag
   to be considered related.
 * Regards
 * [http://wordpress.org/extend/plugins/all-related-posts/](http://wordpress.org/extend/plugins/all-related-posts/)

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

 *  Plugin Author [Maarten](https://wordpress.org/support/users/maartenjs/)
 * (@maartenjs)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-all-related-posts-wp_-database-prefix-hardcoded/#post-2095041)
 * Hi max_Q,
    I will correct the database query issue in the next version. Also 
   I’ll try to take into account the extend to which posts match, so better matching
   posts will get preferential treatment. Thanks for your feedback!
 *  Plugin Author [Maarten](https://wordpress.org/support/users/maartenjs/)
 * (@maartenjs)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-all-related-posts-wp_-database-prefix-hardcoded/#post-2095048)
 * Hi max_Q,
    I’ve fixed the database issue and improved the algorithm for finding
   related posts. Posts that are more related (match more categories and tags) will
   be shown first. Please evaluate this improvement and let me know what you think.

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

The topic ‘[Plugin: All Related Posts] wp_ database prefix hardcoded’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/all-related-posts.svg)
 * [All Related Posts](https://wordpress.org/plugins/all-related-posts/)
 * [Support Threads](https://wordpress.org/support/plugin/all-related-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/all-related-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-related-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-related-posts/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Maarten](https://wordpress.org/support/users/maartenjs/)
 * Last activity: [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-all-related-posts-wp_-database-prefix-hardcoded/#post-2095048)
 * Status: resolved