I have six categories for posts and I want to use the front page of my site to show two things:
1. A post published as sticky that is always the first post shown.
2. The latest non-sticky post in the category.
I set the appropriate post in each category to sticky. Then I defined a custom variable called stickypost which I set to a value of 1 in all of those initial posts. The other posts do not define that custom variable.
Following an example I found on this forum and that seemed to work for what I wanted, I put the following line of code just before the loop in the index.php file of my template:
query_posts('meta_key=stickytop&orderby=meta_value&order=ASC');
I've tried both ASC and DESC as order values but they both produce the same result, leading me to believe that there's something haywire here. If I don't give the custom variable stickytop any value, it would seem like the entry would not have such an entry with any value but perhaps WP is defaulting to something that's messing with the sort order?