Replace has_posts with built-in have_posts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user