• Zero-Blade

    (@zero-blade)


    Hello everyone!

    I am trying to change the homepage loop on a site to show categories instead of posts, but as I am new to php I cannot get around how to make it. This is the loop on the theme I am using:

    <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts(“paged=$paged&cat=-“.$GLOBALS[blog_id]); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); $count++; ?>

    I want to display only the categories on the home page, which would link to the first post in each category. I’m using wordpress as site, not a blog.

    Thanks in advance!

  • The topic ‘Display categories instead of posts on homepage’ is closed to new replies.