Support » Plugin: Filter Page by Template » Not unique table/alias: ‘wp_postmeta’ error

  • I’ve found a solution to this error in my case, but I wanted to alert you to it as it may cause the plugin to conflict with other plugins/themes.

    My theme is using add_filter('posts_join') and add_filter('posts_where') to add Advanced Custom Fields data to the search. This involves injecting a LEFT JOIN of the wp_postmeta table into the query. Your plugin is also doing an INNER JOIN of wp_postmeta, resulting in this error.

    I was able to fix this by giving the joined table a unique alias in my query. But you may also want to do that with your plugin, to help ensure that it doesn’t conflict with other plugins that may be out there.

    Once I had this resolved, the plugin works great! Thanks!

  • The topic ‘Not unique table/alias: ‘wp_postmeta’ error’ is closed to new replies.