WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Remove post per page limit and sort alphabetically

[Resolved] Remove post per page limit and sort alphabetically

  • Hello

    Can somebody help me with the following problem:

    In the archive area of my blog I want to show on top all relevant post titles (and hence remove the post per limit temporarily) and list them in alphabetical order.

    I manage to one of the two but not both:

    If I use:

    <?php $posts = query_posts( $query_string . '&orderby=title&order=asc' ) ?>

    The post titles are ordered but the post per page limit is enforced

    If I use:

    <?php $posts = query_posts( 'posts_per_page=-1&cat=' . $cat ) ?>

    The post titles are not order but the limit is removed (and somehow strangely the monthly archives now include all post titles even from other months but the category archives work fine)

    Is there a way to combine the two codes: Ie.: order the applicable archive posts alphabetically and the remove the post per page limit temporarily in order to display all relevant blog titles?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Remove post per page limit and sort alphabetically’ is closed to new replies.
Skip to toolbar