How to query by post name first letter
-
I’m trying to put together a directory and would like a way to query my posts based on the first letter. I’m guessing I need to use query_posts(). Here is a base SQL snippet:
name = 'A%'
In other words I just want to return posts that begin on the letter “A”. I could just return everything then use javascript to create and dynamically sort the whole list, but that gets really long and will no doubt tax the webserver and database. Is there another way around this so I can query posts that begin on a certain letter?
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to query by post name first letter’ is closed to new replies.