Link to a page where the issue can be seen: sorry, local host
I expected to see: Items sorted like this:
1: Pöschl
2: Pohl
Instead, I got:
1: Pohl
2: Pöschl
It's a problem with the german umlauts. Often they are arranged after every other letter (x, y, z, ä, ö, ü, ß).
But to sort them the correct way you must handle them as they where translated like this:
ä = ae
ö = oe
ü = ue
ß = ss
It would be great if it were possible to sort by post slugs instead of post titles. Since German umlauts are rarely used in URLs, WordPress is so intelligent and generates correctly translated post slugs, i.e. the title "Pöschl" would result in the slug "poeschl".
So if I could sort by post slug the output of the items would be in the correct order 🙂
Hello. Thank you for contacting the Toolset support.
Well - I would like to know, do you want to add sortable column for post slug - if yes, I just checked and added the sortable column for post slug and I can see its working fine.
If this is not your case - could you please tell me where exactly you want to apply sorting?
Hello, no, I don't want to sort a column (what column?), I want to sort the listing of posts. You can adjust this in the general settings for view and for WordPress archives (please see attached screenshot, Beitragstitel = Post title). At the moment the output of archive listings is in the wrong order.
As far as I can see you can sort by post title, post date, post id, post author, post type, sort order in the menu, random order and by custom fields, but not by post slug.
If you do not know how to use it - I would like to give a try and check if that works for you. For that I need access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
I see you have post type archive page on which you want to display the correct order by post slug.
I've added following code to your current theme's functions.php file:
add_filter('posts_orderby', 'orderby_custom_callback', 10, 2);
function orderby_custom_callback($orderby_statement, $wp_query) {
global $wpdb;
# Verify correct post type, or any other query variable
if ($wp_query->get("post_type") === "autoren") {
# In this trivial example add a reverse menu order sort
return $wpdb->prefix ."posts.post_name ASC";
} else {
# Use provided statement instead
return $orderby_statement;
}
}
I can see now 6th and 7th entries are displayed as per your requirement. Could you please confirm.
=> hidden link