Title: Understanding and modifying function of
Last modified: February 13, 2017

---

# Understanding and modifying function of

 *  [reezy](https://wordpress.org/support/users/reezy/)
 * (@reezy)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/understanding-and-modifying-function-of/)
 * Hi,
 * I am currently working on a wordpress site that is constantly evolving, currently
   the site has slideshows that call the <!–nextpage–> function at the end of each
   image. We are trying to change it so that it will display 2 images on mobile 
   while keeping it at 1 image on desktop.
 * The problem I am running into is that I do not understand how the comment <!–
   nextpage–> calls to its function so I may modify it and place a counter for mobile
   views that will allow the users in mobile to see two images before going to the
   next page. In Addition I need to place an ad inbetween these images.
 * My original Idea was to insert a counter that would negate the 1st <!–nextpage–
   > tag and insert a ad code instead, and then use the 2nd <!–nextpage–> to place
   the navigation menu. Reset counter and then have this continue throughout the
   post until the end of the post.
 * However I am not sure how the comment <!–nextpage–> pulls all of its coding so
   it is currently outside of my capabilities to do without obtaining a bit more
   knowledge on its function. Can anyone enlighten me a bit?

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

 *  [montrealist](https://wordpress.org/support/users/spectrus/)
 * (@spectrus)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/understanding-and-modifying-function-of/#post-8801353)
 * > that call the <!–nextpage–> function at the end of each image.
 * What does this mean? Where is this occurring, exactly? In the template page for
   the image?
 *  Thread Starter [reezy](https://wordpress.org/support/users/reezy/)
 * (@reezy)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/understanding-and-modifying-function-of/#post-8814587)
 * <!–nextpage–> is the pagebreak code that wordpress seems to use with pagination.
   I am uncertain of how it is implemented though because <!–nextpage–> is a comment.
   I am not sure how WP picks up on the comment and places the pagebreak.
 * Also in case it wasn’t a typo and this site makes 2 – into one.. it should look
   similar to this : <!- – nextpage – ->

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

The topic ‘Understanding and modifying function of’ is closed to new replies.

## Tags

 * [pagination](https://wordpress.org/support/topic-tag/pagination/)
 * [slideshows](https://wordpress.org/support/topic-tag/slideshows/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [reezy](https://wordpress.org/support/users/reezy/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/understanding-and-modifying-function-of/#post-8814587)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
