Replace has_posts with built-in have_posts

This commit is contained in:
Scott Walkinshaw
2012-09-20 12:42:46 -06:00
parent ca582c1aff
commit 671cb95ebc
2 changed files with 1 additions and 6 deletions

View File

@@ -68,8 +68,3 @@ function is_element_empty($element) {
$element = trim($element);
return empty($element) ? false : true;
}
function has_posts() {
$count = wp_count_posts('post');
return ($count->publish > 0) ? true : false;
}

View File

@@ -15,7 +15,7 @@
<?php wp_head(); ?>
<?php if (has_posts()) : ?>
<?php if (have_posts()) : ?>
<link rel="alternate" type="application/rss+xml" title="<?php echo get_bloginfo('name') ?> Feed" href="<?php echo home_url() ?>/feed/">
<?php endif; ?>
</head>