Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #351218

    Hi All,

    I need to display posts alphabetically. This is normally done in the category.php file.
    Where so I need to do it in Enfold?

    many thanks,
    Peter

    #351505

    Hey TheElear!

    Try installing this plugin, https://wordpress.org/plugins/post-types-order/, to easily change the order of your posts.

    Regards,
    Elliott

    • This reply was modified 9 years, 8 months ago by Elliott.
    #351565

    Hi Elliot,

    The plugin you have mentioned above allows for manual sorting (drag & drop) of posts. Not automatic sorting by name/slug.
    I need to alphabetize all posts by slug. The premium version of the plugin does that but it costs extra $.

    I added the code below to the archive.php under the <?php get_header() ……….. ?> and it works fine:

    <?php 
    				$posts = query_posts($query_string . '&orderby=name&order=asc&posts_per_page=-1'); 
    				?>

    Can you please let me know if archive.php is the only file I need to modify in order to alphabetize category archive, tag archive, all other archives?

    Many thanks for your help,
    regards,
    Peter

    #351566

    Hey Peter!

    Can you please let me know if archive.php is the only file I need to modify in order to alphabetize category archive, tag archive, all other archives?

    That’s correct, you only need to edit archive.php to alter those views you mention.

    Regards,
    Josue

    #351613

    Many thanks Josue,

    regards,
    Peter

    PS. you can now close this thread

    #351616

    Sorry Josue,

    It seems this does not work for Tag archives and Search results.
    Any ideas which files need to be modified for that?
    Is it :
    – tag.php
    – search.php

    thanks,
    Peter

    • This reply was modified 9 years, 8 months ago by TheElear.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Alphabetizing posts’ is closed to new replies.