plugin code is pulling information from database in one instance and not in other. What is wrong?

In general, I’d recommend to read about $wpdb in detail in the Codex. Some notes: Never use the default wp_ prefix. Never set a hard coded prefix. It will be set during installation and should later be added using $wpdb->prefix. But: Prefixes can be changed with the following SQL command. “RENAME table wp_posts TO {$wpdb->prefix}posts;” … Read more

Search queries don’t seem to work?

I’ve found that passing post_type doesn’t restrict searches to that type, but just adds that type to the array it already searches. What you can do to build complex search queries is hook pre_get_posts and do a little query manipulation. For a simple example, first I add my own query var to pass to WordPress’s … Read more