Search handmade tables
-
I’ve been using WordPress for a while now and love it. I’m actually not a programmer but nevertheless I wrote a little plugin that would display selected brands with logo and info. This works very nicely. You can check it out at https://www.brandinfection.com/brands
My question after having tried to figure out the problem myself, googling for search plugins (yes i’ve tried knebble and randomfrequency), reading through the wp support and codex pages… is:
how can I integrate another filter to search a completely different table like my brands table?maybe adding another filter to my already used SearchPages plugin?
maybe tweaking this one ?
function add_paged_search_where($where) {
global $wp_query;
if (!empty($wp_query->query_vars[‘s’])) {
$where = str_replace(‘ AND (post_status = “publish”‘, ‘ AND ((post_status = “static” or post_status = “publish”)’, $where);
}
return $where;
}add_filter(‘posts_where’, ‘add_paged_search_where’);
?>I’d be very happy about your thoughts.
Best regards, Nader
- The topic ‘Search handmade tables’ is closed to new replies.