Title: index.php truncating code; reverts when fixed
Last modified: August 19, 2016

---

# index.php truncating code; reverts when fixed

 *  [Tamara LeRoy](https://wordpress.org/support/users/tamarameske/)
 * (@tamarameske)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/indexphp-truncating-code-reverts-when-fixed/)
 * The index.php file is truncating the last three lines of code to get the sidebar
   and footer, which is throwing a syntax error.
 * The correct code is:
    `<?php get_sidebar(); ?>` `</div>` `<?php get_footer();?
   >`
 * Each time I update it, it reverts after five or ten minutes.
 * I thought to log directly into my host and fix the problem there, but it looks
   right in there. I have no idea what’s happening! Any thoughts would be appreciated.

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

 *  [Matt McInvale](https://wordpress.org/support/users/mcinvale/)
 * (@mcinvale)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/indexphp-truncating-code-reverts-when-fixed/#post-1905689)
 * Enable PHP error reporting. There is likely a problem with index.php that isn’t
   being reported causing this.
 *  Thread Starter [Tamara LeRoy](https://wordpress.org/support/users/tamarameske/)
 * (@tamarameske)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/indexphp-truncating-code-reverts-when-fixed/#post-1905717)
 * I enable this in wp-config.php by setting the value to ‘true,’ right? (I’ve never
   used this feature before…)
 * And… thank you for your reply 🙂

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

The topic ‘index.php truncating code; reverts when fixed’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Tamara LeRoy](https://wordpress.org/support/users/tamarameske/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/indexphp-truncating-code-reverts-when-fixed/#post-1905717)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
