WordPress.org

Ready to get started?Download WordPress

Forums

Incorrect result using sorting posts by title with WP Query and the Loop (1 post)

  1. InvinciP
    Member
    Posted 3 years ago #

    Hello! I post this problem here and hope someone can help me sort out it. I created a custom template to list all my posts. I used $wp_query to pass option to the custom Loop like this:

    <?php
        $temp = $wp_query;
        $wp_query= null;
        $wp_query = new WP_Query();
        $wp_query->query('posts_per_page=40'.'&paged='.$paged.'&category_name=truyen-dai'.'&orderby=title'.'&order=ASC');
    ?>
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
        <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    <?php endwhile; ?>

    It works but there a problem with Vietnamse language. It places the posts starting with letter "Đ" at the end of the list, while in Vietnamese, "Đ" is right after "D".
    If someone know how to fix this plz help me, or if you know whether there are any other methods which fully support sorting unicode characters plz let me know.
    Thks in advance.

Topic Closed

This topic has been closed to new replies.

About this Topic