WP Publication Archive
List Posts Alphabeticalls (4 posts)

  1. Tarquin
    Posted 3 years ago #

    Can anyone help me with a way to list all archive posts alphabetically?


  2. Eric Mann
    Plugin Author

    Posted 3 years ago #

    Unfortunately, that's not something I had in mind when I originally built the plugin, so there isn't a convenient hook to switch the ordering - it's hard coded to order by the publication date of the posts ...

    However, you can hack the existing plugin if you really need this functionality now.

    Around line 63 of /lib/class.wp-publication-archive.php you can see where the default arguments are specified to query for publications. Find the line 'orderby' => 'post_date', and change it to 'orderby' => 'title',. Then find the line 'order' => 'DESC', and change it to 'order' => 'ASC',.

    I will also try to work this functionality into the next version, but please know that whatever changes you make today will be lost when you eventually upgrade.

  3. Tarquin
    Posted 3 years ago #

    This works perfectly for my needs right now! Thanks so much for the help! :)

  4. Tarquin
    Posted 3 years ago #

    Hi There, is there any chance this will work in ordering alphabetically by author? Currently if I use 'orderby' => 'author' it does not seem to list correctly in order.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Publication Archive
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic