Display a number value from mysql query in WP
Your easiest route to this is probably shortcodes, which effectively allow you to insert the output from a bit of PHP code in a post or page. For example, this would create the shortcode [countpeople] which you could pop in any post and it would render the value from the SQL statement using a $wpdb … Read more