Some Blog PhP

Discussion in 'PHP' started by Hades, Sep 14, 2007.

  1. #1
    Hi. I wasn't sure if it was correct to post it in here or in the blogging section, but i think, since this pertains to PHP more, i would post it here. Sorry if it's in teh wrong one.

    My problem is this:

    I have a site, and I want my categories to display the posts in alphabetical order instead of a cronological order.

    I used this line, and put it in the archives.php page, to get it to show in alphabetical order.

    <?php query_posts('orderby=title&order=asc&showposts=-1'); ?>
    PHP:
    The problem is that if that line is present, than the categories will show ALL Posts,not just the posts pertaining to that category. Does anyone know how to fix that?
     
    Hades, Sep 14, 2007 IP
  2. azoundria

    azoundria Member

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    What is the significance of the variables you are feeding through?
     
    azoundria, Sep 15, 2007 IP
  3. manilodisan

    manilodisan Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    From what I see...there's no category selected in your query: "orderby=title&order=asc&showposts=-1", maybe it's before this select statement but I doubt it.
     
    manilodisan, Sep 16, 2007 IP