294 Queries on Mainpage of WordPress

This query will get all the countries and counts in one query: global $wpdb; $countries_count = $wpdb->get_results( ” SELECT meta_value AS country, COUNT(post_id) AS count FROM {$wpdb->postmeta} WHERE meta_key = ‘tgt_job_country’ GROUP BY country ORDER BY country” ); foreach ($countries_count as $country) echo “<li><a href=”http://dsdjjhfgd.net/s=jobseeker&usertype=jobseeker&country=”.$country->country.”&search=Search”>”.$country->country.”(“.$country->count.”)</a></li>”; Unless you need to get the country list first – … Read more

problem with quotes on new post

$post_content=”&quot;Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…&quot;”; Try encoding special characters. See: http://www.w3schools.com/tags/ref_entities.asp & http://php.net/manual/en/function.htmlentities.php