hi
i am trying to show the posts of a certain categoy (ID:306) ordered by date ascending (instead that descending) but it seems that i am not succeding in it.
Can anyone please tell me exactly what to modify and where?
Thanks
hi
i am trying to show the posts of a certain categoy (ID:306) ordered by date ascending (instead that descending) but it seems that i am not succeding in it.
Can anyone please tell me exactly what to modify and where?
Thanks
You can create a category template (in your case it would be category-306.php) with a query_posts() loop.
<?php
query_posts($query_string.'&order=ASC');
if (have_posts()) :
while (have_posts()) : the_post();
<!-- display post e.g. the_content() -->
endwhile;
endif;
?>
Resources:
The Loop
Template Hierarchy
I've been trying this every which way, and it's not working properly for me:
<?php query_posts($query_string.'&orderby=date&order=ASC'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="thumbnail">
<a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><h3 id="post-<?php t
he_ID(); ?>"><?php the_title(); ?></h3><img src="<?php echo get_post_meta($post->ID, "Thumbnail", true);
?>" alt="<?php the_title(); ?> <?php _e(''); ?>" /></a>
<p><?php the_category(', ') ?></p>
</div>
<?php endwhile; //end one post ?>
<?php endif; ?>
The results are still ordered by title alphabetically. Can you help?
Hy there
i'm interested in that aswell and i got an ideea but i'm a designer not a programer http://logitune.fm i want to order the events so that i can show the next events on the homepage
so what about ordering by date if i make the date a custom field... am i talking non sense or is that posible?
can anyone help?
tnx
Bogdan
This topic has been closed to new replies.