Fix #353 - Add conditional feed link, thanks @zslabs
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
|
||||
<meta name="viewport" content="width=device-width">
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Feed" href="<?php echo home_url(); ?>/feed/">
|
||||
|
||||
<script src="<?php echo get_template_directory_uri(); ?>/js/libs/modernizr-2.5.3.min.js"></script>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
<?php
|
||||
|
||||
function roots_feed_link() {
|
||||
$count = wp_count_posts('post'); if ($count->publish > 0) {
|
||||
echo "\n\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"". get_bloginfo('name') ." Feed\" href=\"". home_url() ."/feed/\">\n";
|
||||
}
|
||||
}
|
||||
|
||||
add_action('roots_head', 'roots_feed_link');
|
||||
|
||||
function roots_google_analytics() {
|
||||
$roots_google_analytics_id = GOOGLE_ANALYTICS_ID;
|
||||
if ($roots_google_analytics_id !== '') {
|
||||
|
||||
Reference in New Issue
Block a user