How can i get all poasts beginning with the letter A (in the post_title)?
My idea was to use regex but this code dont work.
$my_custom_query_args = array(
'cat' => '1',
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 25,
'offset' => 0,
'value' => '^'.$letter.'',
'compare' => 'REGEXP'
);
Using
post_where
, this action code be use in custom template.OR you can get all records starts with letter
A
by SQL query and pass the post ids inWP_QUERY
.