Title: Getting themes.php error in dashboard
Last modified: August 19, 2016

---

# Getting themes.php error in dashboard

 *  Resolved [mrsyfa](https://wordpress.org/support/users/mrsyfa/)
 * (@mrsyfa)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/)
 * I was editing my site’s ([http://YawdFromAbroad.com](http://YawdFromAbroad.com))
   index.php file and mistakingly pasted html code from Notepad into the index.php
   file (in the admin screen). Now my site will allow me to log in and access the
   dashboard, but no matter what link I click (settings, write, manage, etc), it
   freezes for like 5 minutes, goes to a blank screen, and then tells me that I 
   am attempting to access the themes.php file. Needless to say I can’t do a thing
   on my site at this point. I’ve attempted to delete the entire index.php file 
   and re-load via FTP it but it’s not working. Can someone please help?? Thanks
   a million.

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761981)
 * > I’ve attempted to delete the entire index.php file and re-load via FTP it but
   > it’s not working.
 * Whats not working? The attempt at uploading, or the fixing?
 * Theres no secret — if you edited a file, and it broke something in doing so, 
   than you need to replace that file with a clean unedited one.
 * That said, mistakenly pasting something matters not until you click “save”.
 *  Thread Starter [mrsyfa](https://wordpress.org/support/users/mrsyfa/)
 * (@mrsyfa)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761983)
 * the re-load did not work, I still can not access anything on the admiin panel
   once I log-in. The clean un-edited index.php file is not fixing the issue, and
   unfortunately I did hit save.
 *  Thread Starter [mrsyfa](https://wordpress.org/support/users/mrsyfa/)
 * (@mrsyfa)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761984)
 * The dashboard looks normal, (except the incoming links and stats are missing),
   but once I click any option on the dashboard, it just gets stuck.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761985)
 * which index.php did you edit?
 * there is more than one.
 * theres one in the root of your install. theres one in every theme folder, theres
   one in your admin area.
 * editing a theme’s index.php should NOT break your ability to do anything inside
   wp-admin/
 * so which one did you edit, and whats **currently** in it?
 *  Thread Starter [mrsyfa](https://wordpress.org/support/users/mrsyfa/)
 * (@mrsyfa)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761986)
 * I broke the index.php file in the theme yfa.com, it has this in it:
    <?php get_header();?
   > <?php /* This version of the front page template provides the latest post in
   the Feature category for the Main Feature section. */ // Feature category query—
   displayed later in template $feature_cat = 1; // set to the Feature category 
   ID # $main_query = new WP_Query(“showposts=1&cat=$feature_cat”); $categories 
   = wp_get_object_terms($post->ID, ‘category’); foreach( $categories as $category){
   if ( $category->term_id != $feature_cat ) { $cat_offset = $category->term_id;
   break; } } ?> <!–BEGIN FEATURE–> <div class=”column span-15 colborder”> <script
   type=”text/javascript”> function startGallery() { var myGallery = new gallery(
   $(‘myGallery’), { timed: true, showArrows: false, showInfopane: true, showCarousel:
   false }); } window.addEvent(‘domready’, startGallery); </script> <div id=”myGallery”
   > <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class=”
   imageElement”> ” title=”Permanent Link to <?php the_title(); ?>” class=”open”
   > <img src=”<?php $key=”photo”; echo get_post_meta($post->ID, $key, true); ?>”
   class=”full” alt=”<?php the_title(); ?>” /><img src=”<?php $key=”small_photo”;
   echo get_post_meta($post->ID, $key, true); ?>” class=”thumbnail” alt=”<?php the_title();?
   >” /> <h3>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>” class
   =”title”><?php the_title(); ?></h3> <?php the_excerpt(); ?> </div> <?php endwhile;
   else: ?> <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p> <?php 
   endif; ?> </div> <hr class=”space” /> </div> <!–END FEATURE–> <!– BEGIN TABBED
   NAVIGATION –> <div class=”column span-8 last”> <div id=”sidebar-home”> <div class
   =”menu tabbed”> <ul class=”tabs”> <li class=”t1″>“><?php _e(‘Latest’); ?> <li
   class=”t2″>“><?php _e(‘Popular’); ?> <li class=”t3″>“><?php _e(‘Departments’);?
   > <li class=”t4″>“><?php _e(‘Contributors’); ?>
 *  <!– LATEST HEADLINES –>
    <div class=”t1″> <?php rewind_posts(); ?> <ul class
   =”latest”> <?php $posts = get_posts(‘numberposts=9&offset=0’); foreach ($posts
   as $post): setup_postdata($post); ?>
    - 
    -  <?php endforeach; ?>
    -  </div>
       <!– POPULAR (MOST COMMENTED POSTS) –> <div class=”t2″> <ul class=”
      popular”> <?php $result = $wpdb->get_results(“SELECT comment_count,ID,post_title
      FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 9”); foreach ($result
      as $topten) { $postid = $topten->ID; $title = $topten->post_title; $commentcount
      = $topten->comment_count; if ($commentcount != 0) { ?>
    - 
    -  <?php } } ?>
    -  </div>
       <!– SECTIONS (CATEGORIES) –> <div class=”t3″> <ul class=”categories”
      > <?php wp_list_categories(‘sort_column=name&optioncount=1&hierarchical=0&
      feed=RSS&offset=5&title_li=’); ?>
    -  </div>
       <!– CONTRIBUTORS –> <div class=”t4″> <ul class=”authors”> <?php wp_list_authors(‘
      exclude_admin=0&hide_empty=0&limit=9’); ?>
    -  </div>
       </div><!– tabbed –> </div> </div> <!– END TABBED NAVIGATION –> <!–
      BEGIN THREE–> <hr /> <div class=”column span-7 colborder”> <div class=”entry”
      > <h6>» <?php wp_list_categories(‘include=12&title_li=&style=none’); ?></h6
      > <hr /> <?php $offset = 0; if ( 12 == $cat_offset ) { $offset = 1; } query_posts(“
      showposts=1&cat=12&offset=$offset”); ?> <?php while (have_posts()) : the_post();?
      > ” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><img src
      =”<?php $key=”thumbnail”; echo get_post_meta($post->ID, $key, true); ?>” alt
      =”” /> <h5>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”
      class=”title”><?php the_title(); ?></h5> <?php the_excerpt(); ?> <p class=”
      small”><?php the_time(‘F jS, Y’) ?> | ” title=”<?php the_title(); ?>”>Read
      | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></
      p> <?php endwhile; ?> </div> </div> <div class=”column span-7 colborder”> 
      <div class=”entry”> <h6>» <?php wp_list_categories(‘include=11&title_li=&style
      =none’); ?></h6> <hr /> <?php $offset = 0; if ( 11 == $cat_offset ) { $offset
      = 1; } query_posts(“showposts=1&cat=11&offset=$offset”); ?> <?php while (have_posts()):
      the_post(); ?> ” rel=”bookmark” title=”Permanent Link to <?php the_title();?
      >”><img src=”<?php $key=”thumbnail”; echo get_post_meta($post->ID, $key, true);?
      >” alt=”” /> <h5>” rel=”bookmark” title=”Permanent Link to <?php the_title();?
      >” class=”title”><?php the_title(); ?></h5> <?php the_excerpt(); ?> <p class
      =”small”><?php the_time(‘F jS, Y’) ?> | ” title=”<?php the_title(); ?>”>Read
      | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></
      p> <?php endwhile; ?> </div> </div> <div class=”column span-7 last”> <div 
      class=”entry”> <h6>» <?php wp_list_categories(‘include=4&title_li=&style=none’);?
      ></h6> <hr /> <?php $offset = 0; if ( 4 == $cat_offset ) { $offset = 1; } 
      query_posts(“showposts=1&cat=4&offset=$offset”); ?> <?php while (have_posts()):
      the_post(); ?> ” rel=”bookmark” title=”Permanent Link to <?php the_title();?
      >”><img src=”<?php $key=”thumbnail”; echo get_post_meta($post->ID, $key, true);?
      >” alt=”” /> <h5>” rel=”bookmark” title=”Permanent Link to <?php the_title();?
      >” class=”title”><?php the_title(); ?></h5> <?php the_excerpt(); ?> <p class
      =”small”><?php the_time(‘F jS, Y’) ?> | ” title=”<?php the_title(); ?>”>Read
      | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></
      p> <?php endwhile; ?> </div> </div> <hr /> <!–END THREE–> <!–BEGIN FIVE–> 
      <div class=”column span-4 colborder”> <div class=”entry”> <h6>» <?php wp_list_categories(‘
      include=3&title_li=&style=none’); ?></h6> <hr /> <?php $offset = 0; if ( 3
      == $cat_offset ) { $offset = 1; } query_posts(“showposts=1&cat=3&offset=$offset”);?
      > <?php while (have_posts()) : the_post(); ?> <h6>” rel=”bookmark” title=”
      Permanent Link to <?php the_title(); ?>” class=”title”><?php the_title(); ?
      ></h6> ” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><img
      src=”<?php $key=”square”; echo get_post_meta($post->ID, $key, true); ?>” alt
      =”” /> <div class=”excerpt_small”><?php the_excerpt(); ?></div> <hr class=”
      space” /> <p class=”small”>” title=”<?php the_title(); ?>”>Read | <?php comments_popup_link(‘
      No Comments’, ‘1 Comment’, ‘% Comments’); ?></p> <?php endwhile; ?> </div>
      </div> <div class=”column span-4 colborder”> <div class=”entry”> <h6>» <?php
      wp_list_categories(‘include=6&title_li=&style=none’); ?></h6> <hr /> <?php
      $offset = 0; if ( 6 == $cat_offset ) { $offset = 1; } query_posts(“showposts
      =1&cat=6&offset=$offset”); ?> <?php while (have_posts()) : the_post(); ?> 
      <h6>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>” class
      =”title”><?php the_title(); ?></h6> ” rel=”bookmark” title=”Permanent Link
      to <?php the_title(); ?>”><img src=”<?php $key=”square”; echo get_post_meta(
      $post->ID, $key, true); ?>” alt=”” /> <div class=”excerpt_small”><?php the_excerpt();?
      ></div> <hr class=”space” /> <p class=”small”>” title=”<?php the_title(); ?
      >”>Read | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’);?
      ></p> <?php endwhile; ?> </div> </div> <div class=”column span-4 colborder”
      > <div class=”entry”> <h6>» <?php wp_list_categories(‘include=5&title_li=&
      style=none’); ?></h6> <hr /> <?php $offset = 0; if ( 5 == $cat_offset ) { 
      $offset = 1; } query_posts(“showposts=1&cat=5&offset=$offset”); ?> <?php while(
      have_posts()) : the_post(); ?> <h6>” rel=”bookmark” title=”Permanent Link 
      to <?php the_title(); ?>” class=”title”><?php the_title(); ?></h6> ” rel=”
      bookmark” title=”Permanent Link to <?php the_title(); ?>”><img src=”<?php 
      $key=”square”; echo get_post_meta($post->ID, $key, true); ?>” alt=”” /> <div
      class=”excerpt_small”><?php the_excerpt(); ?></div> <hr class=”space” /> <
      p class=”small”>” title=”<?php the_title(); ?>”>Read | <?php comments_popup_link(‘
      No Comments’, ‘1 Comment’, ‘% Comments’); ?></p> <?php endwhile; ?> </div>
      </div> <div class=”column span-4 colborder”> <div class=”entry”> <h6>» <?php
      wp_list_categories(‘include=12&title_li=&style=none’); ?></h6> <hr /> <?php
      $offset = 0; if ( 12 == $cat_offset ) { $offset = 1; } query_posts(“showposts
      =1&cat=12&offset=$offset”); ?> <?php while (have_posts()) : the_post(); ?>
      <h6>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>” class
      =”title”><?php the_title(); ?></h6> ” rel=”bookmark” title=”Permanent Link
      to <?php the_title(); ?>”><img src=”<?php $key=”square”; echo get_post_meta(
      $post->ID, $key, true); ?>” alt=”” /> <div class=”excerpt_small”><?php the_excerpt();?
      ></div> <hr class=”space” /> <p class=”small”>” title=”<?php the_title(); ?
      >”>Read | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’);?
      ></p> <?php endwhile; ?> </div> </div> <div class=”column span-4 last”> <div
      class=”entry”> <h6>» <?php wp_list_categories(‘include=11&title_li=&style=
      none’); ?></h6> <hr /> <?php $offset = 0; if ( 11 == $cat_offset ) { $offset
      = 1; } query_posts(“showposts=1&cat=11&offset=$offset”); ?> <?php while (have_posts()):
      the_post(); ?> <h6>” rel=”bookmark” title=”Permanent Link to <?php the_title();?
      >” class=”title”><?php the_title(); ?></h6> ” rel=”bookmark” title=”Permanent
      Link to <?php the_title(); ?>”><img src=”<?php $key=”square”; echo get_post_meta(
      $post->ID, $key, true); ?>” alt=”” /> <div class=”excerpt_small”><?php the_excerpt();?
      ></div> <hr class=”space” /> <p class=”small”>” title=”<?php the_title(); ?
      >”>Read | <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’);?
      ></p> <?php endwhile; ?> </div> </div> <div class=”clearfloat”></div> <!–END
      FIVE–> <?php get_sidebar(); ?> <?php get_footer(); ?>
 *  Thread Starter [mrsyfa](https://wordpress.org/support/users/mrsyfa/)
 * (@mrsyfa)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761990)
 * Whooami,
    I’m suddenly able to access everything now….maybe it was a server issue.
   Never-the-less, thank you for your help and quick response.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761992)
 * as I just said, that _shouldnt_ break anything inside wp-admin.
 * disable the theme. if you are unable to do so inside your wp-admin, then make
   sure that you have the defualt theme uploaded properly, ftp in, and delete the
   directory with the screwed up theme.
 * If that solves your wp-admin problem, that will be a new one on me.
 * —
 * This is why its best to download files that you wish to edit, make the changes
   locally, and then upload the changed files.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761993)
 * youre welcome, crisis averted. 🙂

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

The topic ‘Getting themes.php error in dashboard’ is closed to new replies.

## Tags

 * [dashboard](https://wordpress.org/support/topic-tag/dashboard/)
 * [index.php](https://wordpress.org/support/topic-tag/index-php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [whooami](https://wordpress.org/support/users/whooami/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/getting-themesphp-error-in-dashboard/#post-761993)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
