Custom post type / Filter by letter

Assuming that you have a query result, ordered by your titles ASC and wrapped each “block” in a div with the id="A", etc.:

There’s a PHP function to fill arrays:

$aToZ = range( 'A', 'Z' );

Then you can loop through it:

echo '<ul class="aToZ-list">';
foreach ( $aToZ as $char )
    echo "<li class="aToZ-el"><a href="#{$char}" title="Go to {$char}">{$char}</a></li>";
echo '</ul>';

Now you have a list that you can style via CSS.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)