Support » Fixing WordPress » variable post styling, multiple loops, and pagination

  • I have a sort of complicated index page and I’m having trouble getting pagination to work with it.

    Here’s my site: http://victoriaarriaga.com/test_site/
    As you can see, the second page just seems to repeat the first, and I’m sure it’s because of the multiple loops I have going on. I’ve found other posts here where people have labeled that the problem. Problem is, I have yet to be successful in piecing together their solutions to fit what I’m aiming for.

    Here’s my index/loops:
    http://pastebin.com/babd4KDe

    The first post is the “Featured Post”, which is essentially just the latest post. The rest of the posts are divided into “Left” and “Right” columns based on odd or even number posts, and excluding the first.

    The function for 2-column posts:
    http://pastebin.com/enPdEsch

    What I’m looking for is for either 1) the featured post will only show up on the first page, or 2) the featured post will remain at the top on each page and only the columned posts will change with each page.

    I realize I’ll most likely have to rewrite the page. I did find one forum where someone mentioned using $ post_count, but was unable to figure out how to do it myself, or find any examples.

    Anyway, I’ve been trying to figure this out for about two weeks now – my WordPress PHP skills are still relatively new – and I would love any help someone could offer.

    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The first post is the “Featured Post”, which is essentially just the latest post.

    That starts this topic off with an interesting conversation. Did you intend a loop that includes featured posts (a theme function) and then includes other posts?

    Yea, it’s intended. I suppose “featured post” isn’t the best name for it since it’s not a true “sticky” post. That’s just what I called its div when I first started writing it up. 🙂

    EDIT:
    So it’s essentially not a featured post. I just want the first post to be formatted differently from the rest – to take up the entire width, instead of being formatted into columns like the ones that follow it.

    I’d be happy to be pointed in the right direction. Perhaps linked to other examples that do this dynamically different syling for different sections of the index.

    UPDATE:
    I’ve been able to rewrite the index using the $count variable explained here: http://bythegram.ca/2012/10/tutorials/style-wordpress-posts-in-a-loop-differently/

    My edits:
    http://pastebin.com/mDw0jSF1

    But I’m still unable to get the navigation embedded correctly. As you can see here http://victoriaarriaga.com/test_site/ the nav shows up, but it’s not counting the posts (there are enough for two pages). Idealy, I’d like a nav at the top, where it currently is, and one at the bottom just under the posts.

    Any aditional help would be much appreciated.

    I’ll try and remember to keep this updated for those who may stumble upon it in search of the same answers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘variable post styling, multiple loops, and pagination’ is closed to new replies.