Gallery Inside One Post
These functions will help: //function to get next or previous keys in an array function array_navigate($array, $key){ $keys = array_keys($array); $index = array_flip($keys); $return = array(); $return[‘prev’] = (isset($keys[$index[$key]-1])) ? $keys[$index[$key]-1] : end($keys); $return[‘next’] = (isset($keys[$index[$key]+1])) ? $keys[$index[$key]+1] : current($keys); return $return; } function previous_attachment_ID($att_post){ //get the attachments which share the same post parent $images … Read more