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
-
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 SourceUnless 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.
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.
its on permalink pages also, not just index.php
Either way, the sidebar is probably symptomatic of the larger issue.
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.
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<?php
/* Short and sweet */
define(‘WP_USE_THEMES’, true);
require(‘./wp-blog-header.php’);
?>this is my index code
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.
<?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(); ?>
this is it. thanks again for your help.
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<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” <?php language_attributes(); ?>><head profile=”http://gmpg.org/xfn/11″>
<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 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 –>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
How long have you had this blog? Did you recently upgrade to the latest version?
I have had the blog for two years now. I just upgraded about a week ago.
The topic ‘Sidebar code issue’ is closed to new replies.