2

I'm trying to create directory listing in which at the top there will be links...from a-z some what like this:

A B C D E ...............V W X Y Z

When a user presses on A, all the posts with titles starting with A should come, whats the best approach to achieve this?

esafwan
  • 17,311
  • 33
  • 107
  • 166

2 Answers2

2

Someone asked this on wordpress.org check the link for your answer with sample source.

first-letter-posts

jay.lee
  • 19,388
  • 8
  • 39
  • 38
0

You have to implement an SQL request that would use the "LIKE" filter:

SELECT * from post WHERE post.title LIKE 'A%';

This request will give you all the posts starting with the 'A' letter.

Benoit Courtine
  • 7,014
  • 31
  • 42