Support » Fixing WordPress » Home Page Loop

  • jukeboxbully


    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]

Viewing 4 replies - 1 through 4 (of 4 total)
  • what do you mean by “older posts”?



    Just the previous posts.

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



    Try and remove

    if ( $wp_query->max_num_pages > 1)

    and obviously the endif from below it

    see what happens.



    Thanks lee!

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Home Page Loop’ is closed to new replies.