Hi Everyone!
I’m a newbie to PHP…I have experience in HTML and CSS but PHP is a whole new ball game to me. I’m trying to do something which must be SO simple, but because I just can’t understand PHP I’m not able to do it. I literally just want to switch the position of one item on my wordpress site…
Here is the PHP coding for the page…
[php]
<?php // get the selected homepage $homepage = new WP_Query( "showposts=1&post_type=page&page_id=".get_option('page_on_front') ); while ($homepage->have_posts()) : $homepage->the_post(); ?> <?php the_content(); ?>
</div>
<?php
// the thumbnail strip
$slideshow = new WP_Query('posts_per_page='.ide_option('homepage_slideshow_num').'&cat='.ide_option('homepage_slideshow'));
if($slideshow->have_posts()):
?>
<div class="slide">
<?php if(has_post_thumbnail($post->ID)): ?>
<a href="<?php the_permalink(); ?>" class="thumb"><?php the_post_thumbnail( 'large' ); ?><span><?php the_title(); ?></span></a>
<?php else: ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="text"><?php the_excerpt(); ?></div>
<?php endif; ?>
<div class="meta">
<span class="date"><?php the_time(get_option('date_format')); ?></span> —
<span class="category"><?php the_category(', '); ?></span>
</div>
<div class="clear"> </div>
</div>
<?php endwhile; ?>
</div>
<script type="text/javascript">
//<![CDATA[
var ide_autoslide = <?php echo ide_option('homepage_autoslide') ? 'true' : 'false'; ?>;
//]]>
</script><?php
endif;
wp_reset_query();
// the thumbnail strip
$strip = new WP_Query('posts_per_page='.ide_option('homepage_thumbstrip_num').'&cat='.ide_option('homepage_thumbstrip'));
if($strip->have_posts()):
?>
<ul class="strip noul">
<li class="title"><?php the_category(' '); ?></li>
<?php while($strip->have_posts()): $strip->the_post(); ?>
<li>
<span class="date"><?php the_time(get_option('date_format')); ?></span>
<div class="clear"> </div>
<a href="<?php the_permalink(); ?>" class="thumb"><?php the_post_thumbnail( 'tiny' ); ?></a>
<h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<div class="clear"> </div>
</li>
<?php endwhile; ?>
</ul>
<div class="clear"> </div>
<?php
endif;
wp_reset_query();
// featured category blocks
$featured_cats = ide_option('homepage_featured');
if($featured_cats[0] == '-') { // all categories
$featured_cats = get_all_category_ids();
}
foreach($featured_cats as $cat_id):
$category = get_category($cat_id);
$featured = new WP_Query( "posts_per_page=".ide_option('homepage_featured_num')."&cat=".$cat_id );
?>
<ul class="featured noul">
<li class="title"><a href="<?php echo get_category_link($cat_id); ?>" title="<?php echo $category->name; ?>"><?php echo $category->name; ?></a></li>
<?php
if ( $featured->have_posts() )
while ( $featured->have_posts() ) : $featured->the_post();
// rest of the posts with thumbnail images
?>
<li class="entry">
<?php if(has_post_thumbnail($post->ID)): ?>
<a href="<?php the_permalink(); ?>" class="thumb"><?php the_post_thumbnail(); ?></a>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<?php else: ?>
<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<div class="text"><?php echo get_the_excerpt(); ?></div>
<?php endif; ?>
<div class="meta">
<span class="date"><?php the_time(get_option('date_format')); ?></span>
</div>
<div class="clear"> </div>
</li>
<?php endwhile; ?>
</ul>
<?php endforeach; ?>
<div class="clear"> </div>
Any help would be MUCH appreciated. Thank you!