Tagged: post order
-
AuthorPosts
-
November 14, 2014 at 1:19 pm #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,
PeterNovember 14, 2014 at 9:13 pm #351505Hey 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 10 years, 11 months ago by
Elliott.
November 14, 2014 at 11:25 pm #351565Hi 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,
PeterNovember 14, 2014 at 11:33 pm #351566Hey 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,
JosueNovember 15, 2014 at 12:32 am #351613Many thanks Josue,
regards,
PeterPS. you can now close this thread
November 15, 2014 at 12:38 am #351616Sorry 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.phpthanks,
Peter-
This reply was modified 10 years, 11 months ago by
TheElear.
-
This reply was modified 10 years, 11 months ago by
-
AuthorPosts
- The topic ‘Alphabetizing posts’ is closed to new replies.
