WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Sort Posts on Category Page Alphabetically (17 posts)

  1. ukrob12
    Member
    Posted 7 years ago #

    I am attempting to do as the topic describes: on category pages display all the posts in that category on one page alphabetically (by title).

    I am using the following code to do this currently:

    <?php
    $postslist = get_posts('numberposts=100&order=ASC&orderby=post_title');
    foreach ($postslist as $post) : start_wp(); ?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> |
    			<small>
    			Posted on <?php the_time('M d Y');?>
    			</small>
    
    			</li>
    <?php endforeach; ?>

    It works.. but the problem currently is that it creates empty lines for all the posts, including ones not in that category.

    As that probably didn't make much sense, see http://users.ice-berg.net/worldspinsmadlyon/?cat=3

    What am I doing wrong currently?

    Thanks in advance

  2. shimon
    Member
    Posted 7 years ago #

    Change status to "not resolved" so others will help you. It will be easier for them to find a person who needs help.

  3. ukrob12
    Member
    Posted 7 years ago #

    Sorry, I should have said I fixed it myself.

    Thanks anyway..

  4. Chris_K
    Member
    Posted 7 years ago #

    Consider sharing your fix to help the next person with the same question?

  5. ukrob12
    Member
    Posted 7 years ago #

    Certainly!

    It's quite simple really, I just used the "Custom Query String" plugin instead :D

    Which, by the way, is a great plugin!!

  6. Zoinks! Graphics
    Member
    Posted 6 years ago #

    If it's such a great plugin, a link would be nice.... ;)

  7. Zoinks! Graphics
    Member
    Posted 6 years ago #

    After searching the forums, here it is...

    Custom Query String (reloaded for 2.3.x)

  8. ec18
    Member
    Posted 6 years ago #

    Do you need to do anything to get the custom query string plugin to sort alphabetically?

  9. Kafkaesqui

    Posted 6 years ago #

    Yes. You need to set it to do so. Settings under Options > CQS. Look over the Order By options.

  10. ec18
    Member
    Posted 6 years ago #

    Thanks :D

  11. speedy23
    Member
    Posted 6 years ago #

    hi
    i need this plugin "Custom Query String (reloaded for 2.3.x)"
    but the site doesn't open. do you know anywhere to download it?

  12. Kafkaesqui

    Posted 6 years ago #

    speedy, I would try it again. I've never had a problem getting to moshu's site. Was probably a temporary net issue.

  13. speedy23
    Member
    Posted 6 years ago #

    kafkaesqui, i am trying always with ff and ie, but the site (http://www.transycan.net/blogtest/2007/10/30/custom-query-string-reloaded-for-wordpress-23-with-tag-support/) does not open. Do you know any different place to download this plugin?

  14. Kafkaesqui

    Posted 6 years ago #

  15. speedy23
    Member
    Posted 6 years ago #

    thanks for your posts but I cannot open any page of this domain including homepage.
    isn't there anywhere to download?

  16. Kafkaesqui

    Posted 6 years ago #

    Temporarily, for you speedy:

    http://guff.szub.net/download/cqs_reloaded.zip

  17. speedy23
    Member
    Posted 6 years ago #

    thanks a lot kafkaesqui. I started to use, it's what I need.
    thanks again

Topic Closed

This topic has been closed to new replies.

About this Topic