Problem with "More" (1 post)

  1. thomas514
    Posted 4 years ago #

    I want to display the last 2 posts of cat 4, that works great like this:

    // The Query
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts('cat=4&posts_per_page=2&paged=' . $paged);
    // The Loop
    while (have_posts()) : the_post(); ?>
    <?php the_title(); ?>
    <?php the_content('LIRE LA SUITE »'); ?>
    <?php endwhile;
    // Reset Query

    but it does not work anymore when I add another code before to display a specific post:

    query_posts( 'p=38' );
    // set $more to 0 in order to only get the first part of the post
    global $more;
    $more = 0;
    // the Loop
    while (have_posts()) : the_post(); ?>
    <?php the_content( 'LIRE LA SUITE »' );

    What happens is that the post displays completely, the "more" is not taken into account....

    Anyone who can help me here correct this?
    Anyone can tell me here what to do to make it work?

Topic Closed

This topic has been closed to new replies.

About this Topic