Can home.php display category_description()?
-
can it? I am not able to get this to show up in my homepage. I have a query in home.php to filter for category posts set to “home” (cat=1) and that sorts them reverse chron (ASC)
<?php
if (is_home()) {
query_posts("cat=1&order=ASC");
}
?>
<div id="intro"><?php echo category_description(); ?></div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="contentblock" id="post-<?php the_ID(); ?>">
I’ve tried various combinations of where the intro div is placed in the code to see if that changes anything, but it doesn’t.
However, if I create a category-1.php file and upload and set up a way to get to it, the description DOES show up.
What’s up with that? The code is exactly the same (query and loop). The problem with using category-1.php page on the button link is that this page will not load automatically.
TIA
The topic ‘Can home.php display category_description()?’ is closed to new replies.