Title: Archive.php help
Last modified: August 19, 2016

---

# Archive.php help

 *  [znetdev](https://wordpress.org/support/users/znetdev/)
 * (@znetdev)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/)
 * Hello all,
    I have the default archive.php template all made up. My client has
   asked that if there is a post which has more than one page, a link be provided
   reading “NEXT PAGE”. If the post is not paged then nothing will be showed. I’ve
   been trying various things for the past couple days, and I’ve just not succeeded.
   Can anyone point in the direction/provide an example of how I might achieve this?
 * Thanks,
    Stephen

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/#post-1326258)
 * do you mean, if someone entered `<!--nextpage-->` into the txt of a post?
 * try this:
    `<?php if(wp_link_pages('echo=0')) { echo 'this page/post has more
   than one part'; }; ?>` in the loop where you show the post titles(?).
 * [http://codex.wordpress.org/Template_Tags/wp_link_pages](http://codex.wordpress.org/Template_Tags/wp_link_pages)
 *  Thread Starter [znetdev](https://wordpress.org/support/users/znetdev/)
 * (@znetdev)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/#post-1326291)
 * nope, that didn’t work either 🙁
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/#post-1326296)
 * could you stick your archive.php into a [pastebin ](http://wordpress.pastebin.com/)(
   with the position marked where you want that ‘NEXT PAGE’ link) so someone can
   have a look at it?
 * what are your test posts like?
 * btw: in what way did it not work?
    link never showing? link always showing? error
   message?
 *  Thread Starter [znetdev](https://wordpress.org/support/users/znetdev/)
 * (@znetdev)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/#post-1326310)
 * [HERE IT IS](http://wordpress.pastebin.com/m2815e6e9).
 * [@alchymyth](https://wordpress.org/support/users/alchymyth/): It just doens’t
   show up or detect it.
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/#post-1326314)
 * line 37 and 46:
 *     ```
       <?php if(wp_link_pages('echo=1')) { echo 'this page/post has more than one part'; }; ?>
       ```
   
 * should read **‘echo=0’ **– last try for today 😉
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/#post-1326316)
 * btw: ‘echo=1’ is the default, and would echo the links as described in the codex(
   here is the link again: [http://codex.wordpress.org/Template_Tags/wp_link_pages](http://codex.wordpress.org/Template_Tags/wp_link_pages)).
   ‘
   echo=0’ would return a string, which can then be used (tested, worked with etc.)
 * if you examine single.php of the default theme, they are using ‘wp_link_pages’
   in the loop after the_content.

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

The topic ‘Archive.php help’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/archivephp-help-1/#post-1326316)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
