Forums

List of last articles in a category on the homepage (1 post)

  1. yunuzyunuz
    Member
    Posted 4 years ago #

    I have posted this in an old thread, but my problem seems to be different than what is discussed there, so I am reposting separately.

    I use this code in a page (not in the sidebar), which I have set to be the homepage of my website:

    <?php
    
    query_posts('cat=3', 'showposts=4');
    ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <p class="hplist"><a href="<?php the_permalink() ?>"><?php the_title() ?></a></p>
    
    <?php endwhile; endif; ?>

    (I use Exex-PHP to do this)

    The outcome is mixed -- I get the desired result (list of links to articles in the specified category), but I also get the full text of the articles below the list. You can see the result here:

    http://projectoria.org

    Can you advise how to fix this, i.e. avoid the full articles being shown?

Topic Closed

This topic has been closed to new replies.

About this Topic