• 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 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding current category to query_posts’ is closed to new replies.