Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 95814

mlol on "Adding current category to query_posts"

$
0
0

So I am reworking my category page. I want to list all of the posts in the category in alphabetical order and output certain things per post like custom fields etc.

I have The Loop working, and it displays some custom fields for each post.

The problem is, it sorts them by (i think most recent post) by default and I want it to be title/alphabetical order. I figured out how to do this using query_post, but now it is querying all posts, and I just need to add "only current category" of the category page into query_posts. I tried defining a variable using "get_the_category" before the loop, but it is returning an array. Here is my current query_post:

query_posts('&order=ASC&orderby=title&');

just need to add in current category to the parameters. Any suggestions?


Viewing all articles
Browse latest Browse all 95814

Trending Articles