WordPress.org

Ready to get started?Download WordPress

Forums

Home Page Loop (5 posts)

  1. jukeboxbully
    Member
    Posted 2 years ago #

    Hi all.

    I am having trouble with a loop I've created for the home page.

    Basically - I'd like 2 portfolio posts to show up with a link to older posts. I was able to get the posts loop to work, but not the link to older posts.

    Can anyone see what I'm doing wrong?

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  2. YouON
    Member
    Posted 2 years ago #

    what do you mean by "older posts"?

  3. jukeboxbully
    Member
    Posted 2 years ago #

    Just the previous posts.

    I have 4 posts in this category. Only 2 are displaying, so there should be a link to previous posts.

  4. lee@digitalacorn
    Member
    Posted 2 years ago #

    Try and remove

    if ( $wp_query->max_num_pages > 1)

    and obviously the endif from below it

    see what happens.

  5. jukeboxbully
    Member
    Posted 2 years ago #

    Thanks lee!

    That worked. I borrowed the code from another loop, so apparently I don't really know what I'm doing!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.