I created a wordpress plugin with a shortcode. I am just wondering why the content in the shortcode does not show after calling
Below is the code:
$query = "SELECT * FROM table WHERE field='$var' ORDER BY field2 ASC"; //return 'test'; //this one works... $results = $wpdb->get_results($query); if($results === false) return 'error occured'; //wont work or display if(count($results) > 0) return 'has results'; //wont work or display also.. else return 'no results found' //wont work or display also..
The query was okay because I returned it before calling the function then test in mysql, and there are results. Now what is going on here?