Title: using hard coded WP prefix
Last modified: August 21, 2016

---

# using hard coded WP prefix

 *  Resolved [orbisius](https://wordpress.org/support/users/orbisius/)
 * (@orbisius)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/using-hard-coded-wp-prefix/)
 *     ```
       $where = preg_replace(
       			"/(wp_posts.post_title (LIKE '%{$wp->query_vars['s']}%'))/i",
       			"$0 OR ( $wpdb->postmeta.meta_value LIKE '%{$wp->query_vars['s']}%' )",
       			$where
       			);
       ```
   
 * should be
 *     ```
       $where = preg_replace(
       			"/($wpdb->posts.post_title (LIKE '%{$wp->query_vars['s']}%'))/i",
       			"$0 OR ( $wpdb->postmeta.meta_value LIKE '%{$wp->query_vars['s']}%' )",
       			$where
       			);
       ```
   
 * [http://wordpress.org/plugins/post-meta-searcher/](http://wordpress.org/plugins/post-meta-searcher/)

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

 *  Plugin Author [lukerollans](https://wordpress.org/support/users/hellolukerollansme/)
 * (@hellolukerollansme)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/using-hard-coded-wp-prefix/#post-4353418)
 * Indeedy. Was overlooked as this plugin has mainly been a tool just for my personal
   use and I never use table prefixes other than the default.
 * Thanks for the feedback, I’ll make this fix and release a new version very shortly.
 *  Plugin Author [lukerollans](https://wordpress.org/support/users/hellolukerollansme/)
 * (@hellolukerollansme)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/using-hard-coded-wp-prefix/#post-4353423)
 * Version 1.2 has just been released which addresses this issue.
 * Thanks for the feedback!

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

The topic ‘using hard coded WP prefix’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post-meta-searcher_cbcac9.svg)
 * [Post Meta Searcher](https://wordpress.org/plugins/post-meta-searcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-meta-searcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-meta-searcher/)
 * [Active Topics](https://wordpress.org/support/plugin/post-meta-searcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-meta-searcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-meta-searcher/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [lukerollans](https://wordpress.org/support/users/hellolukerollansme/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/using-hard-coded-wp-prefix/#post-4353423)
 * Status: resolved