• 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Posted a possible solution on your other thread. Don’t know if it will help, but it’s worth a shot.

    Thread Starter syncbox

    (@syncbox)

    nah, I had a query in there. Funny, I am able to see the category description everywhere else it appears, just not home.

    I have a home.php file and a home (cat=1) category. Could this be a problem? it’s driving me batty!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Can home.php display category_description()?’ is closed to new replies.