FiIlter by letter

Posted in: Newspaper
Post count: 21

Hello,

I wanna add a leter filter on a page so all the post wich title starts with that letter whould be show. I am using a funtion and I created a new page template but none works. Can you help me?

function ap_where_clause($where=”){
global $wpdb;
global $ap;
$where .= ‘ AND ‘.$wpdb->prefix.’posts.post_title LIKE “‘.mysql_real_escape_string($ap).’%”‘;
return $where;
}

Post count: 3343

Hi,
Just add a block on your page and set this sort type: http://screencast.com/t/xGh5njnAS

Post count: 21

Yes. But I add a letter menu so when you click “A”, only the post wich title strat with “A” would be showed.

Post count: 21
Post count: 3343

Hi,
Great!, I’m glad that you have managed the issue!

Have a nice day!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.