WordPress.org

Support

Support » Plugins and Hacks » Retrieve posts grouped alphabetically

Retrieve posts grouped alphabetically

  • Hi,

    I’m developing a plugin and I need it to show all published posts grouped alphabetically. Something like this:

    A
    post
    post

    B
    post
    post

    C
    post
    post

    and so on.

    I’m wondering if it’s possible to retrieve all post grouped this way using the get_posts() function.

    Any help anyone can offer in pointing me in the right direction would be much appreciated, as would specific suggestions.

    Thanks

Viewing 1 replies (of 1 total)
  • Sort by ‘post_title’– aka 'orderby'=>'post_title'. You will get posts in alphabetical order by post title, but you won’t get that grouping exactly. You will have to construct that yourself.

Viewing 1 replies (of 1 total)
  • The topic ‘Retrieve posts grouped alphabetically’ is closed to new replies.
Skip to toolbar