Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Naeslund

    (@naeslund)

    Sorry, one more thing =)

    When you click on a category, it only shows 10 posts (in my opinion, wrong order) and no paging. =(

    How can we show the full list, or show some paging?

    Here is the site:
    https://www.inspirationhouse.se/test/

    Tanka again. =)

    I would also like to know how to sort the listings on the category page alphabetically.

    Actually, I believe I figured it out. Naeslund, add this to the category.php template, directly above the Loop like so:

    <?php
      $posts = query_posts($query_string . '&orderby=title&order=ASC&posts_per_page=-1');
    ?>
    
    <?php
      while (have_posts()) {
        the_post();
        ldl_get_template_part('listing', 'compact');
      }
    ?>
    Thread Starter Naeslund

    (@naeslund)

    Thanks!!! It worked perfect! =)

    Here is also a code to display the category-name at the top of the page. (category.php)

    <?php
      $obj = get_queried_object();
      $name = $obj->name;
    ?>
    
    <?php echo $name; ?>

    That worked for me to Thanks:) Maybe Mark can include it in the next version. Any ideas on the listings not being created that seems to be a be a big prob at the moment ??

    Wow you guys are rad!! Thanks for posting the code!

    This worked great. I would also recommend sorting order be something we can control from the Directory -> Settings screen.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sorting lists by alphabet?’ is closed to new replies.