WordPress.org

Ready to get started?Download WordPress

Forums

Specific Category Posts on front page, next and prev (4 posts)

  1. eladear
    Member
    Posted 5 years ago #

    I'm new to the forum. I've read a good number of posts in the search results, but I can't seem to find the solution to my problem.

    I have a magazine style layout, which has a space with a small number of recent posts within one category. I'd like to add a next and prev, so that when clicked it will stay on frontpage but load a new page showing the next posts within this category.

    For displaying the posts, I'm doing it with:

    <?php $recent = new WP_Query("cat=6&showposts=6"); while($recent->have_posts()) : $recent->the_post();?>
    <li><a href="<?php the_permalink() ?>" rel="bookmark"></a>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="<?php the_title(); ?>" class="thumb" /><?php the_title(); ?></a>

    Now I've tried a number of tag for next and prev, trying to add the category name, to pull more posts on the frontpage. But none have worked. The idea is almost like having a new column with all "arts" related posts, and when clicking next or prev, you see more within the same front page.

    Any advice would be great. Thanks!

  2. eladear
    Member
    Posted 5 years ago #

    Please anyone?

  3. eladear
    Member
    Posted 5 years ago #

    Does anyone know what code I could use? I've tried many examples from the support area but they've not worked.

  4. eladear
    Member
    Posted 5 years ago #

    No one knows.

Topic Closed

This topic has been closed to new replies.

About this Topic