WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Getting themes.php error in dashboard (9 posts)

  1. mrsyfa
    Member
    Posted 6 years ago #

    I was editing my site's (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.

  2. whooami
    Member
    Posted 6 years ago #

    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".

  3. mrsyfa
    Member
    Posted 6 years ago #

    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.

  4. mrsyfa
    Member
    Posted 6 years ago #

    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.

  5. whooami
    Member
    Posted 6 years ago #

    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?

  6. mrsyfa
    Member
    Posted 6 years ago #

    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); ?>

  7. " title="<?php the_title(); ?>"><?php the_title(); ?>
  8. <?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) { ?>

  9. " title="<?php echo $title ?>"><?php echo $title ?>
  10. <?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(); ?>

  • mrsyfa
    Member
    Posted 6 years ago #

    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
    Member
    Posted 6 years ago #

    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
    Member
    Posted 6 years ago #

    youre welcome, crisis averted. :)

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags