<?php $i = 1; if(!empty($_GET['sort'])) { $orderby=trim($_GET['sort']); $order=trim($_GET['order']); $key=trim($_GET['key']); // create the sort by injection $posts = query_posts($query_string.'&orderby='.$orderby.'&meta_key='.$key.'&order='.$order.''); } if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php if ($i % 2 == 0) { $alt = " class=\"alt\""; } else { $alt = " class=\"no\""; } echo "<div" . $alt; if (is_sticky()) { echo " id='sticky' "; } echo ">"; ?>
<?php $i = 1; if ( !empty($_GET['sort']) ) { $orderby = trim($_GET['sort']); $order = trim($_GET['order']); $key = trim($_GET['key']); query_posts($query_string . '&caller_get_posts=1&orderby=' . $orderby . '&meta_key=' . $key . '&order=' . $order); } if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if ( $i % 2 == 0 ) { $alt = " class=\"alt\""; } else { $alt = " class=\"no\""; } echo "<div" . $alt; if ( is_sticky() ) { echo " id='sticky' "; } echo ">"; ?>
There are currently 1 users browsing this thread. (0 members and 1 guests)