1
我想按字母順序排列WP中的帖子,但是我沒有得到我期待的結果。這就是我得到:Wordpress - 按字母順序排列包含數字和字母的帖子
NOZ - 1 apple
NOZ - 10 orange
NOZ - 11 banana
NOZ - 2 tree
NOZ - 3 grass
這是我想要得到什麼:
NOZ - 1 apple
NOZ - 2 tree
NOZ - 3 grass
NOZ - 10 orange
NOZ - 11 banana
這是我的PHP代碼:
<?php $loop = new WP_Query(array('post_type' => 'myPosts', 'orderby' => 'title', 'order' => 'ASC', 'posts_per_page' => -1) ); ?>
非常感謝你的幫助。
太棒了,它的工作,非常感謝! –