• Hi!

    I think a I do have a serious problem with my archive.php file.

    The common code that follows:

    <?php get_header() ?>
    	<div id="contentwrap">
    		<?php if(have_posts()): ?>
    		<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    		<?php /* If this is a category archive */ if (is_category()) { ?>
    		<h2 class="pagetitle">Archive for the '<?php single_cat_title(); ?>' Category</h2>
    		<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    		<h2 class="pagetitle">Posts Tagged With '<?php single_tag_title(); ?>'</h2>
    		<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
    		<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
    		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
    		<?php /* If this is an author archive */ } elseif (is_author()) { ?>
    		<h2 class="pagetitle">Author Archive</h2>
    		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    		<h2 class="pagetitle">Blog Archives</h2>
    		<?php } ?>
    		<?php while (have_posts()) : the_post();
            $c++; // increment the counter
             if( $c % 2 != 0) {
          	   $extra_class = 'leftpost';
               } else {
               $extra_class = 'rightpost';
               }
            ?>
    			<div <?php post_class($extra_class) ?> id="post-<?php the_ID(); ?>">
                     <span class="time"><?php the_time('F d, Y'); ?></span>
    				<h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
    				<div class="entry">
                    <?php if ( function_exists( 'get_the_image' ) ) {
                get_the_image( array( 'custom_key' => array( 'post_thumbnail' ), 'default_size' => 'full', 'image_class' => 'aligncenter', 'width' => '319', 'height' => '150' ) ); }
                ?>
    					<?php the_content(''); ?>
    				</div>
    
                    <div class="meta">
                     <?php comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?', 'comm'); ?>
                     <a class="more-link" href="<?php the_permalink() ?>#more">Continue Reading</a>
                    </div>
    			</div>
    
              <?php if(++$counter % 2 == 0) : ?>
              <div class="clearp"></div>
              <?php endif; ?>
    
    		<?php endwhile; ?>
    
            <?php
                include('includes/wp-pagenavi.php');
                if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
            ?>
    
    	<?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    is basically turned into this:

    [Code moderated. Please do not post hack code blocks in the forums. Please use the pastebin]

    Would you be so kind to help me?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Archive.php malicious hack’ is closed to new replies.