Exclude sticky posts at the top
-
Hi,
In my theme I have this code to display the post and I want to exclude the sticky post at the top so that they regain a normal order.
<?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 ">"; ?>
I know I have to use this code but not as you insert it into the existing code.
query_posts('caller_get_posts=1');
What I have to do?
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Exclude sticky posts at the top’ is closed to new replies.