Title: Archives widget error / code error?
Last modified: August 19, 2016

---

# Archives widget error / code error?

 *  [moonliner](https://wordpress.org/support/users/moonliner/)
 * (@moonliner)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/archives-widget-error-code-error/)
 * When I click on a past post in the archive widget, I get this error:
 * Fatal error: Call to undefined function related_posts() in single.php on line
   22
 * Here is line 22 from single.php
    - <? related_posts(); ?>
 * Can anyone explain the problem?

Viewing 1 replies (of 1 total)

 *  [sweetangst](https://wordpress.org/support/users/sweetangst/)
 * (@sweetangst)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/archives-widget-error-code-error/#post-1149194)
 * Could be wrong, but shouldn’t that be: <?php related_posts(); ?>

Viewing 1 replies (of 1 total)

The topic ‘Archives widget error / code error?’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 1 reply
 * 2 participants
 * Last reply from: [sweetangst](https://wordpress.org/support/users/sweetangst/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/archives-widget-error-code-error/#post-1149194)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
