Created
December 16, 2014 22:01
-
-
Save whyisjake/6938221d9c658e58e8f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is the ideal post, based on the current pointer. | |
$ideal = $query->posts[ $index ]->ID; | |
if ( in_array( $ideal, $used ) ) { | |
// If it is in the array, update the index to the next. | |
// What this doesn't have, is a way to go 2+... | |
$index++ | |
} | |
// Grab the post. | |
$_post = $query->posts[ $index ]; | |
// Update the pointer. | |
$index++; |
tollmanz
commented
Dec 16, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment