Title: Sidebar code issue
Last modified: August 19, 2016

---

# Sidebar code issue

 *  [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/)
 * Hi everyone,
    My sidebar is at the bottom of my posts. Can anyone tell me how
   to fix it? I am pretty ignorant of XHTML so please speak slowly 😉
 * -Shadra
 * [my blog](http://www.shadrastrickland.com/wordpress/)

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/sidebar-code-issue/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/sidebar-code-issue/page/2/?output_format=md)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751293)
 * Umm.. have you looked at the source of your blog?
 * If you are using Firefox:
 * Hit ctrl-u at the same time
 * OR
 * 1. Go to View in the top most menu
    2. Scroll down to View Page Source
 * Unless you are doing free advertising, your blog is hacked BIG time.
 * I wont even comment on the 747 errors that the validator sees since a good deal
   of them are undoubtedly due to that.
 * Needless to say, you have more to fix than a fallen sidebar.
 *  [mechx1](https://wordpress.org/support/users/mechx1/)
 * (@mechx1)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751294)
 * It looks to me like there is a large amount of link spam injected into your index
   page. you should start by looking at the code for the file index.php, located
   in wp-content/themes/default if you are using the default theme, which it appears
   you are.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751295)
 * its on permalink pages also, not just index.php
 * Either way, the sidebar is probably symptomatic of the larger issue.
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751315)
 * I saw the code. um….WOW…yeah, I have NO IDEA where that came from or how o fix
   it.
    I looked at the index page and there is nothing there. How do I get rid 
   of all of this?
 * I deleted spam through wordpress, but apparently this code still got in.
 * Thanks so much.
 *  [mechx1](https://wordpress.org/support/users/mechx1/)
 * (@mechx1)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751324)
 * The spam links won’t appear directly in your code. There will be some small piece
   of code that calls the ads in from a remote server when the page is accessed.
   You may have code injected in several of your files, I’m suggesting that you 
   start by checking the code for index.php in your theme first. From the injection
   point in the source, it is likely that this code appears right after your `<body
   >` tag
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751327)
 * <?php
    /* Short and sweet */ define(‘WP_USE_THEMES’, true); require(‘./wp-blog-
   header.php’); ?>
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751328)
 * this is my index code
 *  [mechx1](https://wordpress.org/support/users/mechx1/)
 * (@mechx1)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751331)
 * I believe that is your root index. I think your theme index should be at /wp-
   content/themes/default/index.php. That’s the code you want to check.
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751333)
 * <?php
    get_header(); ?>
 * <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 * <?php the_date(”,'<h2>’,'</h2>’); ?>
 * <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h3 class=”storytitle”>” rel
   =”bookmark”><?php the_title(); ?>
   </h3>
    <div class=”meta”><?php _e(“Filed under:”);?
   > <?php the_category(‘,’) ?> — <?php the_tags(__(‘Tags: ‘), ‘, ‘, ‘ — ‘); ?> 
   <?php the_author() ?> @ <?php the_time() ?> <?php edit_post_link(__(‘Edit This’));?
   ></div>
 *  <div class=”storycontent”>
    <?php the_content(__(‘(more…)’)); ?> </div>
 *  <div class=”feedback”>
    <?php wp_link_pages(); ?> <?php comments_popup_link(
   __(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?> </div>
 * </div>
 * <?php comments_template(); // Get wp-comments.php template ?>
 * <?php endwhile; else: ?>
    <p><?php _e(‘Sorry, no posts matched your criteria.’);?
   ></p> <?php endif; ?>
 * <?php posts_nav_link(‘ — ‘, __(‘« Older Posts’), __(‘Newer Posts »’)); ?>
 * <?php get_footer(); ?>
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751334)
 * this is it. thanks again for your help.
 *  [mechx1](https://wordpress.org/support/users/mechx1/)
 * (@mechx1)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751338)
 * There should be a file in the same folder called header.php. Look in there, especially
   for any code that appears right after the `<body>` tag
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751339)
 * <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt);
   
   <html xmlns=”[http://www.w3.org/1999/xhtml&#8221](http://www.w3.org/1999/xhtml&#8221);
   <?php language_attributes(); ?>>
 * <head profile=”[http://gmpg.org/xfn/11″&gt](http://gmpg.org/xfn/11″&gt);
    <meta
   http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?
   php bloginfo(‘charset’); ?>” />
 *  <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>
 *  <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> 
   <!– leave this for stats please –>
 *  <style type=”text/css” media=”screen”>
    [@import](https://wordpress.org/support/users/import/)
   url( <?php bloginfo(‘stylesheet_url’); ?> ); </style>
 *  <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php
   bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS.
   92″ href=”<?php bloginfo(‘rss_url’); ?>” /> <link rel=”alternate” type=”application/
   atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
 *  <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_get_archives(‘
   type=monthly&format=link’); ?> <?php //comments_popup_script(); // off by default?
   > <?php wp_head(); ?> </head>
 * <body>
    <div id=”rap”> <h1 id=”header”>/”><?php bloginfo(‘name’); ?></h1>
 * <div id=”content”>
    <!– end header –>
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751341)
 * I’m not too familiar with code, but this looks okay to me. I randomly checked
   other files with no luck. I replaced the old Classic files earlier and that didn’t
   do anything either. *sigh
 *  [mechx1](https://wordpress.org/support/users/mechx1/)
 * (@mechx1)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751383)
 * How long have you had this blog? Did you recently upgrade to the latest version?
 *  Thread Starter [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * (@shadra-strickland)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/#post-751385)
 * I have had the blog for two years now. I just upgraded about a week ago.

Viewing 15 replies - 1 through 15 (of 28 total)

1 [2](https://wordpress.org/support/topic/sidebar-code-issue/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/sidebar-code-issue/page/2/?output_format=md)

The topic ‘Sidebar code issue’ is closed to new replies.

## Tags

 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 28 replies
 * 4 participants
 * Last reply from: [shadra-strickland](https://wordpress.org/support/users/shadra-strickland/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/sidebar-code-issue/page/2/#post-751459)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
