Support » Plugin: TPG Get Posts » Issue with offsets?

  • Resolved Christa Hutchins


    I want a horizontal row of just the featured image of my last four blog posts on my home page. I did not see a horizontal option in tpg-get-posts, so I used a grid plug in to create four columns and put the tpg-get-posts shortcode in each column. As long as I have numberposts=1 in all four columns and no offsets, it looks like it should work. I get the featured image from my latest post in each column. But when I start adding offsets, so that offset=1 in the second column, offset=2 in the third column and offset=3 in the third column, it works fine in the second column … i get the featured image for my next-to-last post. But the third and fourth columns are blank. No image at all.

    Any idea what might be going on or if there is an easier way to accomplish what I am trying to do?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Christa Hutchins


    Ahhh .. and I just tried putting offset=3 in the second column and now it goes blank. So it seems to be some kind of problem with offset > 1. What am I missing?

    Plugin Author Criss Swaim


    Hi Christa:

    I ran a simple test on my site and the offset worked for 1 & 2. I had 3 posts in the category. Offsets of 1 & 2 worked and 3 returned a blank.

    offset=1 returns post 2 & 3
    offset=2 returns post 3

    Make sure your selection criteria returns > n posts, where n is the offset value. If you enter offset=3 and return 3 posts, then a blank post is displayed, because you are telling wp to display the 4th post which does not exist in the answer set for the wp_query.

    Does that make sense?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issue with offsets?’ is closed to new replies.