문제

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?

도움이 되었습니까?

해결책

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

first-letter-posts

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top