if there's posts */ function roots_feed_link() { $count = wp_count_posts('post'); if ($count->publish > 0) { echo "\n\t\n"; } } add_action('wp_head', 'roots_feed_link', -2); /** * Add the asynchronous Google Analytics snippet from HTML5 Boilerplate * if an ID is defined in config.php * * @link mathiasbynens.be/notes/async-analytics-snippet */ function roots_google_analytics() { if (GOOGLE_ANALYTICS_ID) { echo "\n\t\n"; } } add_action('wp_footer', 'roots_google_analytics');