Quantcast
Channel: Topic Tag: plugin | WordPress.org
Viewing all articles
Browse latest Browse all 26892

Markgasm on "wp_posts custom mysql column name"

$
0
0

Hi, I am having very similar problem I would love to solve.

I have in my wp_posts table a column called post_region

so when querying from a search form ($search_query contains the search term as in [s] => search term) my array will be.

$array2 = array(
			'post_region' => '4'
);

$search_query = array_merge((array)$search_query, (array)$array2);
query_posts($search_query );

The search query comes through fine but post_region is ignored, I assume the code you have provided maybe registers the new column but I can't get it to work.
SO say for example I include 'post_type' => 'post'

That gets recognised, so my code is fine apart from obviously the that query_posts() function isn't setup to recognise it.

Any idea's thanks


Viewing all articles
Browse latest Browse all 26892

Trending Articles