I am using the wordpress theme wptube premium and my site is imediazone.net. I would like to do the following: As you can see on my site 12 posts(video thumbs), what i want is after the 9 th post, when i add more posts to end the sidebar and let me add more posts ( another 2 would fit) after that.
My main index template is:
<?php
get_header();
$orderby = 'date_new';
$orderby = '&orderby=date';
if(isset($_GET['order']) && !empty($_GET['order']))
{
$order = $_GET['order'];
switch($order)
{
case 'date_old' : $orderby = '&orderby=date&order=ASC';
break;
case 'rated' : $orderby = '&r_sortby=highest_rated&r_orderby=desc';
break;
case 'viewed' : $orderby = '&v_sortby=views&v_orderby=desc';
break;
case 'discussed' : $orderby = '&orderby=comment_count';
function comment_count_orderby( $orderby ) {
return "comment_count DESC";
}
add_filter('posts_orderby', 'comment_count_orderby');
break;
default : $orderby = '&orderby=date';
break;
}
}
$order_url = get_option('home').'/?order=';
?>
<div id="wrapper" alt="free music videos">
<div id="mainbody" alt="free music videos">
<?php if(is_home() && !is_paged()) { ?>
<div id="myslides"> <img src="<?php bloginfo('template_directory');?>/images/cornerimage.png" class="cornerimage" alt="cornerimage"/>
<?php include (TEMPLATEPATH . "/includes/slide.php"); ?>
</div>
<?php } ?>
<div id="content" alt="free music videos">
<div class="sortby_container" alt="free music videos">
<div class="sortby_body" alt="free music videos">
<div class="fl" alt="free music videos">
<?php if($order=='rated') : ?>
<?php _e('| Sorted by Highest Rated', 'wpt') ?>
<?php endif; ?>
<?php if($order=='discussed') : ?>
<?php _e('| Sorted by Most Discussed', 'wpt') ?>
<?php endif; ?>
<?php if($order=='viewed') : ?>
<?php _e('| Sorted by Most Viewed', 'wpt') ?>
<?php endif; ?>
<?php if($order=='date_new') : ?>
<?php _e('| Sorted by Newest First', 'wpt') ?>
<?php endif; ?>
<?php if($order=='date_old') : ?>
<?php _e('| Sorted by Oldest First', 'wpt') ?>
<?php endif; ?>
</div>
<div id="sortbybox" class="fr" alt="free music videos">
<ul class="menu" alt="free music videos">
<li><a href="#" onclick="javascript:showlayer('sm_1')">
<?php _e('Sort by', 'wpt') ?>
</a>
<ul class="submenu" id="sm_1">
<li><a href="<?php echo $order_url; ?>rated">
<?php _e('Highest Rated', 'wpt') ?>
</a></li>
<li><a href="<?php echo $order_url; ?>discussed">
<?php _e('Most Discussed', 'wpt') ?>
</a></li>
<li><a href="<?php echo $order_url; ?>viewed">
<?php _e('Most Viewed', 'wpt') ?>
</a></li>
<li><a href="<?php echo $order_url; ?>date_new">
<?php _e('Newest First', 'wpt') ?>
</a></li>
<li><a href="<?php echo $order_url; ?>date_old">
<?php _e('Oldest First', 'wpt') ?>
</a></li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="clearboth" alt="free music videos"></div>
<?php query_posts($query_string.$orderby); if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php if ( in_category(get_option('wptube_non_vid_category'))) : ?>
<ul class="display thumb_view">
<li>
<div class="window" alt="free music videos">
<div class="postb_bottom" alt="free music videos">
<div class="posti_inside" alt="free music videos">
<div class="paneleft_nonvideo"> <?php print_video_thumb($post) ?> </div>
<div class="paneright" alt="free music videos">
<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute('echo=1'); ?>">
<?php the_title(); ?>
</a></h4>
<div class="entry">
<?php the_excerpt(''); ?>
</div>
<div class="continue"><a href="<?php the_permalink(); ?>">
<?php _e('Continue »', 'wpt'); ?>
</a></div>
</div>
</div>
<div class="postfeedback">
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
<?php comments_popup_link(__('No Comments', 'wpt'), __('1 Comment', 'wpt'), __('% Comments', 'wpt')); ?>
|
<?php if(function_exists('the_views')) { the_views(); } ?>
|
<?php the_time('j F Y') ?>
</div>
</div>
<div style="clear:both;"></div>
</div>
<div class="videopart" alt="free music videos">
<div class="paneleft_nonvideo"> <?php print_video_thumb($post) ?> </div>
<div class="vid_title"> <a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
<?php $tit = the_title('','',FALSE); echo substr($tit, 0, 40); if (strlen($tit) > 40) echo " »"; ?>
</a><br />
</div>
<div class="date_views" alt="free music videos">
<?php if(function_exists('the_views')) { the_views(); } ?>
|
<?php the_time('j M y') ?>
</div>
<div style="clear:both;"></div>
</div>
</li>
</ul>
<?php else : ?>
<ul class="display thumb_view">
<li>
<div class="window" alt="free music videos">
<div class="postb_bottom" alt="free music videos">
<div class="posti_inside" alt="free music videos">
<div class="paneleft"> <?php print_video_thumb($post) ?> </div>
<div class="paneright" alt="free music videos">
<h4><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute('echo=1'); ?>">
<?php the_title(); ?>
</a></h4>
<div class="entry">
<?php the_excerpt(''); ?>
</div>
<div class="continue" alt="free music videos"><a href="<?php the_permalink(); ?>">
<?php _e('Continue »', 'wpt'); ?>
</a></div>
</div>
</div>
<div class="postfeedback" alt="free music videos">
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
|
<?php comments_popup_link(__('No Comments', 'wpt'), __('1 Comment', 'wpt'), __('% Comments', 'wpt')); ?>
|
<?php if(function_exists('the_views')) { the_views(); } ?>
|
<?php the_time('j F Y') ?>
</div>
</div>
<div style="clear:both;" alt="free music videos"></div>
</div>
<div class="videopart" alt="free music videos">
<div class="paneleft" alt="free music videos"> <?php print_video_thumb($post) ?> </div>
<div class="vid_title" alt="free music videos">
<?php $tit = the_title('','',FALSE); echo substr($tit, 0, 40); if (strlen($tit) > 40) echo " »"; ?>
<br />
</div>
<div class="date_views" alt="free music videos">
<?php if(function_exists('the_views')) { the_views(); } ?>
|
<?php echo time_ago(); ?>
</div>
<div style="clear:both;"></div>
</div>
</li>
</ul>
<?php endif; ?>
<?php endwhile; ?>
<h1></h1>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
</div>
<?php get_sidebar(); ?>
<?php else : ?>
<h3>
<?php _e('Your search', 'wpt'); ?>
<strong>"<?php echo get_search_query(); ?>"</strong>
<?php _e('did not match any documents.', 'wpt'); ?>
</h3>
<br/>
<h4>
<?php _e('Suggestions:', 'wpt'); ?>
</h4>
<ul class="searchresindex">
<li>
<?php _e('Make sure all words are spelled correctly.', 'wpt'); ?>
</li>
<li>
<?php _e('Try different keywords.', 'wpt'); ?>
</li>
<li>
<?php _e('Try more general keywords.', 'wpt'); ?>
</li>
</ul>
</div>
<?php get_sidebar(); ?>
<?php endif; ?>
</div>
<?php get_footer(); ?>
AND my style.css is: http://www.imediazone.net/multimedia/themes/wptube/style.css.
Here is a screen shoot of what i want to do:
Don’t know where to get started i am a noob in php. And i know some css, but i declare myself still a noob.
Please do help me i will add reputation point.