I was not the person who created the website…I looked through the list of plugins, it doesn’t seem to be there. What is there, however, is a function.php code inside the theme, I’ll copy and paste it at the bottom. Also, I was told that the last time the problem occured, “introduced a change to ahs_adjacent_image_link() (in the theme folder in functions.php) that had been introduced in the latest WordPress upgrade”, but I don’t believe we’ve upgraded since then
function ahs_previous_image_link( $link_text ) {
print ahs_adjacent_image_link( $link_text, true );
}
function ahs_next_image_link( $link_text ) {
print ahs_adjacent_image_link( $link_text, false );
}
function ahs_adjacent_image_link( $link_text, $prev = true) {
global $post;
$post = get_post($post);
$attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') ));
foreach ( $attachments as $k => $attachment )
if ( $attachment->ID == $post->ID )
break;
$k = $prev ? $k - 1 : $k + 1;
if ( isset($attachments[$k]) )
return '<a href="' . get_attachment_link( $attachments[$k]->ID ) . '">' . $link_text . '</a>';
else
return false;
}