Offset loop not showing the last post

If you’re offsetting each query to not show the previous 3 posts, your offsets are set wrong. Try an offset: 3 on staff02_args and increment each succeeding query from there. 3, 6, 9 Instead of 4, 7, 10

Undefined offset: 1

The problem is that $Exploded_slug[1] is empty, don’t forget that arrays are 0-based. So you need to change your query. Also it is preferred to use lower case for regular variables like yours, so I’d also change $Exploded_slug to $exploded_slug. Here’s the code: $exploded_slug = explode($user->ID.’–‘, $url_slug); $query = “SELECT comments FROM wp_rdp_winners WHERE id … Read more

Using something else instead of using 9 wp_query

I don’t have a full detailed response for you, but here’s a few things I’d suggest: 1) Use template parts for each of those segments. That will help clean up the template so it’s easier to work with in the future. ( see here: https://konstantin.blog/2013/get_template_part/ ) 2) You could then create a helper function for … Read more