Title: Problem editing widgets.php
Last modified: August 18, 2016

---

# Problem editing widgets.php

 *  Resolved [bryan868](https://wordpress.org/support/users/bryan868/)
 * (@bryan868)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/problem-editing-widgetsphp/)
 * I’m editing the “Standard Widgets” section of widgets.php, trying to duplicate
   this piece of code:
 * `<?php
    } function widget_recent_entries($args) { extract($args); $title = __('
   Recent Posts', 'widgets'); $r = new WP_Query('showposts=10'); if ($r->have_posts()):?
   > <?php echo $before_widget; ?> <?php echo $before_title . $title . $after_title;?
   > <ul> <?php while ($r->have_posts()) : $r->the_post(); ?> <li><a href="<?php
   the_permalink() ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?
   > </a></li> <?php endwhile; ?> </ul> <?php echo $after_widget; ?>
 * This is the recent posts widget, I’m trying to duplicate it. However when I copy
   this and then paste another one below it, I get a parse error. Any idea why?

Viewing 1 replies (of 1 total)

 *  Thread Starter [bryan868](https://wordpress.org/support/users/bryan868/)
 * (@bryan868)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/problem-editing-widgetsphp/#post-516509)
 * Nevermind, I figured it out! Please delete!

Viewing 1 replies (of 1 total)

The topic ‘Problem editing widgets.php’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [bryan868](https://wordpress.org/support/users/bryan868/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/problem-editing-widgetsphp/#post-516509)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
