Hi Mahmood,
thanks for your help.
I finally ended up with an own solution. I replaced the plugin with a snippet.
I share it here for those who also looking for such functionality.
It works in category.php(or archive-php). Where you want the ABC navigation to be shown, insert this: alphabet_navi();
And this coding goes into the functions.php:
if($_GET[“alphabet”])
{
add_filter(‘posts_where’,’alphabet_selection’, 10 , 2 );
function alphabet_selection( $where )
{
global $wpdb;
$where .= “AND LEFT({$wpdb->prefix}posts.post_title, 1) = ‘”.$_GET[“alphabet”].”‘ “;
return $where;
}
}
function alphabet_navi() {
// Collecting all posts within current category into an array
$cat_id = get_queried_object_id();
$args = array(
‘cat’ => $cat_id,
‘orderby’ => ‘post_title’,
‘order’ => ‘ASC’,
‘nopaging’ => true,//get all posts
‘posts_per_page’ => -1); //get all posts
$posts = get_posts($args);
$existing_chars_only = array(); //collecting in that the first characters from post titles-only those which exist in the category
foreach ($posts as $post) :
$ltr_group = substr($post->post_title, 0, 1);
if(!in_array($ltr_group, $existing_chars_only)){ //Add CHAR only if new
$existing_chars_only[] = $ltr_group;
}
endforeach;
//Collecting all posts within current category into an array-END
//echo ABC list
$wp_alphabet = range(“A”,”Z”);
echo ‘<div class=”alphabet_navi-wrap”>’;
echo ‘<div class=”alphabet_navi-letters”>’;
echo ‘<ul class=”alphabet_navi-links”>’;
foreach ($wp_alphabet as $wp_aplha){
if(in_array($wp_aplha,$existing_chars_only)){ //if this CHAR exist among the posts
if($_GET[“alphabet”] == $wp_aplha){ //if we are on a page of the selected CHAR
echo ‘<li class=”alphabet_navi-hasposts alphabet_navi-selected”>‘.$wp_aplha.’‘;
}
else{
echo ‘<li class=”alphabet_navi-hasposts”>‘.$wp_aplha.’‘;
}
}
else{ //if there isn’t such CHAR among the posts
echo ‘<li class=”alphabet_navi-noposts”>’.$wp_aplha.’‘;
}
}
//echo ‘‘;
echo ‘</div>’;
echo ‘</div>’;
}`