此查询有什么问题?sortby=名称不会改变任何内容。
$the_query = \'posts_per_page=-1&sortby=name&order=ASC&post_type=mycustom&custom_cat=mycat\';
// query is made
query_posts($the_query);
此查询有什么问题?sortby=名称不会改变任何内容。
$the_query = \'posts_per_page=-1&sortby=name&order=ASC&post_type=mycustom&custom_cat=mycat\';
// query is made
query_posts($the_query);
“sort”查询参数通常是“orderby”而不是“sortby”,以匹配SQLORDER BY
条款
或许可以尝试:
$the_query = \'posts_per_page=-1&orderby=name&order=ASC&post_type=mycustom&custom_cat=mycat\';
您传递的值也可能不正确,但在不了解自定义帖子类型的详细信息的情况下,我无法提供更多建议。我有一些注册的分类法,如下所示:/********************************* Género *****************************/ function genre_init() { $labels_genre = array( \'name\' => _x( \'Géneros\', \'taxonomy general name\' ), \'singular_name\' => _