0
votes

I have a taxonomy-tools.php page that displays (at the url mysite.com/post-type/custom-taxonomy) all the posts from that custom taxonomy, using only the simple loop (if have posts...etc).

I'm looking for a way to sort these results alphabetically and to display more than 10 posts.

I tried with query_posts, but I get all the results for that post type and not for the taxonomy only.

1

1 Answers

0
votes

hi have you tried something like

$args = array(
  'post_type'=> 'custom-post-type',
  'order'    => 'ASC',
  'orderby'  => 'title',
  'tag'      => 'your-custom-post-tag', // use this if its a tag
  'cat'      => 'your-custom-category', // use this is its a category
  'posts_per_page' => 30,
  'post_status'    => 'publish'
);
query_posts( $args );

then just use the basic loop which you have been using?