Title: Sidebar misaligned
Last modified: August 20, 2016

---

# Sidebar misaligned

 *  Resolved [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/)
 * Hi
 * I did not create this WordPress website, but I’m tasked to fix some errors.
 * See page: [http://www.hysasystems.org/?page_id=61&goog=1](http://www.hysasystems.org/?page_id=61&goog=1)
 * The sidebar is at the bottom instead of on the right. Can you see the error in
   the code:
 *     ```
       <?php
       /*
       Template Name: Students Page
       */
       function checkRemoteFile($url)
       {
           $ch = curl_init();
           curl_setopt($ch, CURLOPT_URL,$url);
           // don't download content
           curl_setopt($ch, CURLOPT_NOBODY, 1);
           curl_setopt($ch, CURLOPT_FAILONERROR, 1);
           curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
           if(curl_exec($ch)!==FALSE)
           {
               return true;
           }
           else
           {
               return false;
           }
       }
       ?>
   
       <?php get_header(); ?>
       <div id="aligner">
       	<div id="mainpage">
       	<div id="section1">
   
               <div id="section1a">
       		<?php if($_SESSION['theurl']=="ccr"){$thebanner="http://www.hysasystems.org/wp-content/uploads/ccr/images/bannera.png";}
       		else if($_SESSION['theurl']=="hysa"){$thebanner="http://www.hysasystems.org/wp-content/uploads/hysa/images/foldbanner.png";}
       		else if($_SESSION['theurl']=="cchange"){$thebanner="http://www.hysasystems.org/wp-content/uploads/cchange/images/titlebanner1.jpg";} ?>
                <div id="sec1amenu"> <img src="<?php echo $thebanner; ?>" style="position:absolute;left:-17px"/>
                   <h1 id="heading1"><?php $tit=get_the_title(); echo $tit;?></h1></div>
       			<div style="height:2px;background-color:#B6B1A8;width:100%"></div>
                   <div id="maintext" style="margin:0; margin-bottom:.5em;font-size:0.8em;"> <div>
       				<?php
       					  // The Query
       						// The Loop
       						$myloop=0;
       						$count=0;
       						for($myloop=0;$myloop<2;$myloop++){
       						$count=0;
       						 $theheader="";
       						 if($myloop==0){
       						 	$theheader="Students";
       						 }
       						 else if($myloop==1){
       						 	$theheader="Spokes";
       						 }
   
       						 echo "<div style='padding:30px 0 10px 0'><div style='float:left;width:10px;height:10px;background-color:#f15f23;padding:3px'></div><div id='theheader' style='padding:0 10px;float:left;font-weight:500'>$theheader</div><div style='clear:both'></div></div>";
       						echo "<div>";
   
       $loop = new WP_Query( array( 'post_type' => 'student' ),'posts_per_page=1000','orderby=title','order=asc' ); 
   
       						 while ( $loop->have_posts() ) : $loop->the_post();
       						 $cchangepos=get_field("cchange_list_position");
       						 $hysapos=get_field("hysa_list_position");
       						 $catpos=get_field("catcenter_list_position");
       						 $mainpos=get_field("position");
       						 if($cchangepos==""){
       						 $cchangepos=7;
       						 }
       						 if($hysapos==""){
       						 $hysapos=7;
       						 }
       						 if($catpos==""){
       						 $catpos=7;
       						 }
       						// echo $cchangepos;
       						//while ( have_posts() ) : the_post();
       							//echo get_field('student_background');
       							//$id=the_ID();
       							//echo get_field('student_background');
       							//echo $theweb;
       							//$meta = get_post_meta($post->ID, "whichweb", true);
       							$meta = get_post_meta($post->ID, "which_websites_students", true);
       							$pos=0;
       							$pos2=0;
       							$pos3=0;
       							for($i=0;$i<count($meta);$i++){
       							if($meta[$i]=="hysa"){
       							$pos=1;
       							}
       							else if($meta[$i]=="ccr"){
       							$pos2=1;
       							}
       							else if($meta[$i]=="cchange"){
       							$pos3=1;
       							}
       							//echo $meta[$i];
       							}
       							$pos=1; $pos2=0; $pos3=0;
       							if($_SESSION['theurl']=="hysa"){
       							if($pos==1){
       							if($myloop==($hysapos-1)){
   
       							$count+=1;
       							$thum=get_post_thumbnail_id();
       							$pichysa=wp_get_attachment_url($thum);
       							echo "<div style='float:left; padding:5px 2px;'>";
       							echo "<a href='".get_permalink()."' style='text-decoration:none'>";
       							echo "<div style='width:142px;min-height:212px;padding:1px; background-color:#eeeeee'>";
       							$remfile=checkRemoteFile($pichysa);
       							if(!$remfile){
       							$pichysa="http://www.hysasystems.org/wp-content/themes/hysa-wordpress/default_user_icon.jpg";
       							}
       							echo "<img src='http://www.hysasystems.org/wp-content/themes/hysa_wordpress/timthumb/timthumb.php?src=$pichysa&w=142&h=192' />";
       							echo '<br>';
       							echo "<div style='text-align:center;color:#f15f23;padding:10px;'>";
       							//echo get_permalink();
       							echo the_title();
       							echo '<br>';
       							echo "</div>";
       							echo "</div>";
       							echo "</a>";
       							echo "</div>";
       							if(($count%4==0)&&($count!=0)){
       							echo "<div style='clear:both'></div>";
       								echo "</div><div style='height:20px;width:10px'></div><div>";
       							}
       							}
       							}
       							}
       							else if($_SESSION['theurl']=="ccr"){
       							if($pos2==1){
       							if($myloop==($catpos-1)){
       							$count+=1;
   
       							$thum=get_post_thumbnail_id();
       							$pichysa=wp_get_attachment_url($thum);
       							echo "<div style='float:left; padding:5px 2px;'>";
       							$perm= get_permalink();
       							$perm1=explode("?",$perm);
       							$perm2="http://www.catcentre.uct.ac.za/?".$perm1[1];
       							echo "<a href='".$perm2."' style='text-decoration:none'>";
       							echo "<div style='width:142px;min-height:212px;padding:1px; background-color:#eeeeee'>";
       							echo "<img src='http://www.hysasystems.org/wp-content/themes/hysa_wordpress/timthumb/timthumb.php?src=$pichysa&w=142&h=192' />";
       							echo '<br>';
       							echo "<div style='text-align:center;color:#336699;padding:10px;'>";
       							//echo get_permalink();
       							echo the_title();
       							echo '<br>';
       							echo "</div>";
       							echo "</div>";
       							echo "</a>";
       							echo "</div>";
       							if(($count%4==0)&&($count!=0)){
       							echo "<div style='clear:both'></div>";
       								echo "</div><div style='height:20px'></div><div>";
       							}
       							}
       							}
       							}
       							else if($_SESSION['theurl']=="cchange"){
       							if($pos3==1){
       							if($myloop==($cchangepos-1)){
       							$count+=1;
   
       							$thum=get_post_thumbnail_id();
       							$pichysa=wp_get_attachment_url($thum);
       							echo "<div style='float:left; padding:5px 2px;'>";
       							$perm= get_permalink();
       							$perm1=explode("?",$perm);
       							$perm2="http://www.cchange.ac.za/?".$perm1[1];
       							echo "<a href='".$perm2."' style='text-decoration:none'>";
       							echo "<div id='mypicbox' style='width:142px;min-height:212px;padding:1px; background-color:#eeeeee'>";
       							echo "<img src='http://www.hysasystems.org/wp-content/themes/hysa_wordpress/timthumb/timthumb.php?src=$pichysa&w=142&h=192' width='142px' height='192px' />";
       							//the_post_thumbnail();
       							echo '<br>';
       							echo "<div style='bottom:0;text-align:center;color:#c92e2f;padding:10px;'>";
       							//echo get_permalink();
       							echo the_title();
       							echo '<br>';
       							echo "</div>";
       							echo "</div>";
       							echo "</a>";
       							echo "</div>";
       							if(($count%4==0)&&($count!=0)){
       							echo "<div style='clear:both'></div>";
       								echo "</div><div style='height:20px'></div><div>";
       							}
       							}
       							}
       							}
       						endwhile;
   
       						// Reset Query
       						wp_reset_query();
       						}
       				?>
       				</div>
       			  </div>
                 </div>
       </div>
       <?php get_sidebar(); ?>
       <?php get_footer(); ?>
       ```
   

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

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

 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116505)
 * I am sorry, but your site is infected with malware as per this report.
    [http://sitecheck.sucuri.net/results/www.hysasystems.org](http://sitecheck.sucuri.net/results/www.hysasystems.org)
 * You need to start working your way through these resources:
    [http://codex.wordpress.org/FAQ_My_site_was_hacked](http://codex.wordpress.org/FAQ_My_site_was_hacked)
   [http://wordpress.org/support/topic/268083#post-1065779](http://wordpress.org/support/topic/268083#post-1065779)
   [http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/](http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/)
   [http://ottopress.com/2009/hacked-wordpress-backdoors/](http://ottopress.com/2009/hacked-wordpress-backdoors/)
 * Additional Resources:
    [http://sitecheck.sucuri.net/scanner/](http://sitecheck.sucuri.net/scanner/)
   [http://www.unmaskparasites.com/](http://www.unmaskparasites.com/) [http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.html](http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.html)
 *  Thread Starter [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116508)
 * Thanks Krishna.
 * I’m backing up the site now. And I’ll go through those links.
 * Any tips on fixing the sidebar in the meantime?
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116521)
 * > Any tips on fixing the sidebar in the meantime?
 * I think if you correct the markup errors (166 Errors and 4 warnings, [see HERE](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.hysasystems.org%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.3)),
   the side bar problem will be over.
 * Additionally, you may look for CSS errors using Firebug and FF.
 *  Thread Starter [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116531)
 * Thanks Krishna, I’m on it! 🙂
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116533)
 * BTW, it seems the malware can be from the Ultimate Fade-in slideshow (v2.4). 
   You may delete the script and check again if malware is reported (though it is
   not a real/ guaranteed solution, and the infection may still reappear).
 *  Thread Starter [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116535)
 * Where do you pick this up?
 * The active slideshow plugin is called “Meteor Slides” – There is no plugin called“
   Ultimate Fade-in slideshow (v2.4)”
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116549)
 * From your site. See at the bottom of the script picked up by [http://sitecheck.sucuri.net/results/www.hysasystems.org](http://sitecheck.sucuri.net/results/www.hysasystems.org)
 * It is script. Type the name of the script on Google search, you can see the site
   distributing it. Possibly, one of the plugins used by you is using that script.
 *  Thread Starter [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116565)
 * Thanks for your continued help, I seriously appreciate it! Thank you!
 * According to this: [http://www.hysasystems.org/wp-content/themes/hysa_wordpress/fadeslideshow.js](http://www.hysasystems.org/wp-content/themes/hysa_wordpress/fadeslideshow.js)–
   the javascript is authored by Dynamic Drive.
 * None of the current plugins are authored by this company. Is it safe to assume
   that the javascript was left there by a previous plugin? If so, could the javascript
   file simply be deleted by ftp?
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116573)
 * > If so, could the javascript file simply be deleted by ftp?
 * You may try it. But it is not a safe solution. It may still either be hiding 
   somewhere or leaving loopholes for backdoor entry.
    [http://codex.wordpress.org/Hardening_WordPress](http://codex.wordpress.org/Hardening_WordPress)
 * The author is listed at the top of [this page by Google](https://www.google.co.in/search?q=Ultimate%20Fade-in%20slideshow%20%28v2.4%29&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&source=hp&channel=np).
 *  Thread Starter [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116579)
 * Ah! Thanks!
 * Having looked at the demos of this slideshow ([here](http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm)),
   it seems that this slideshow is not being used on this site currently.
 * Do you think I should delete the js?
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116583)
 * Delete it.
 *  Thread Starter [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116602)
 * I deleted it.
 * The site still works fine.
 * But the Sucuti SiteCheck still sees the js file as being there: [http://sitecheck.sucuri.net/results/www.hysasystems.org](http://sitecheck.sucuri.net/results/www.hysasystems.org)
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116607)
 * Click the link above and then click RE-SCAN. It verifies clean now.
 *  Thread Starter [jamaaludeen](https://wordpress.org/support/users/jamaaludeen/)
 * (@jamaaludeen)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116613)
 * Sorted, thanks! 🙂
 * One down! 🙂
 *  [Krishna](https://wordpress.org/support/users/1nexus/)
 * (@1nexus)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/#post-3116614)
 * Clean? But keep scanning!

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

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

The topic ‘Sidebar misaligned’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 19 replies
 * 2 participants
 * Last reply from: [Krishna](https://wordpress.org/support/users/1nexus/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/sidebar-misaligned-1/page/2/#post-3116630)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
