Title: webmaster4school's Replies | WordPress.org

---

# webmaster4school

  [  ](https://wordpress.org/support/users/webmaster4school/)

 *   [Profile](https://wordpress.org/support/users/webmaster4school/)
 *   [Topics Started](https://wordpress.org/support/users/webmaster4school/topics/)
 *   [Replies Created](https://wordpress.org/support/users/webmaster4school/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/webmaster4school/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/webmaster4school/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/webmaster4school/engagements/)
 *   [Favorites](https://wordpress.org/support/users/webmaster4school/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Gallery Gap After First Line](https://wordpress.org/support/topic/gallery-gap-after-first-line/)
 *  Thread Starter [webmaster4school](https://wordpress.org/support/users/webmaster4school/)
 * (@webmaster4school)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/gallery-gap-after-first-line/#post-873426)
 * 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;
   
       }
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Gallery Gap After First Line](https://wordpress.org/support/topic/gallery-gap-after-first-line/)
 *  Thread Starter [webmaster4school](https://wordpress.org/support/users/webmaster4school/)
 * (@webmaster4school)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/gallery-gap-after-first-line/#post-873420)
 * [http://ssdsrv.org/about/gallery/first-day-of-school-2008-2009](http://ssdsrv.org/about/gallery/first-day-of-school-2008-2009)
 * that’s the link to one of our gallery pages

Viewing 2 replies - 1 through 2 (of 2 total)