Support » Themes and Templates » wp_query — no “Read More” link

  • Hello,

    I am having an issue with my wp_query. I want my most recent blog/portfolio entry to show up on the main page, but I also want it to just be only the content before the <!–more–> break. It won’t work for me. Is there anyone who has experienced this issue or knows what I’m doing wrong?

    Here is my code:
    $featured = new WP_Query(‘category_name=portfolio’);
    while($featured->have_posts()): $featured->the_post();
    $wp_query->in_the_loop = true;

    <h2><?php the_title();?></h2>
    <?php if(has_post_thumbnail()):?>
    <?php the_post_thumbnail();?>
    <?php endif;?>
    <?php the_content(‘Read More –»’);?>
    <?php endwhile;?>

    I am using 3.0-RC2-15182.

  • The topic ‘wp_query — no “Read More” link’ is closed to new replies.