0
나는이 글을 조금 잃어 버렸습니다.분류 및 맞춤 우편 유형 주문
99 %의 사용자 정의 분류 표를 만들기 위해 인덱스 페이지를 만들려고하지만 orderby를 무시하고 게시 된 날짜 순서로 게시물을 표시합니다.
$number_of_posts = intval(get_option('theme_number_posts_agent'));
$get_county = get_terms(
'new_developments',
array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
)
);
if(!$number_of_posts){
$number_of_posts = 3;
}
foreach ($get_county as $get_countys) {
$agents_query = array(
'post_type' => 'agent',
'posts_per_page' => $number_of_posts,
'paged' => $paged,
'orderby' => 'title', 'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'new_developments',
'field' => 'slug',
'terms' => $get_countys
)
)
);
$agent_listing_query = new WP_Query($agents_query);
if ($agent_listing_query->have_posts()) :
while ($agent_listing_query->have_posts()) :
$agent_listing_query->the_post();
내가
... get_terms에서와 wp_query 아무것도하지만 두 곳에서 ORDERBY 배치 한 어떤 도움을 크게
당신이이 질문을 읽었다 감사합니다이 가장 대답이 플러그인을 사용할 수있는 것 같아요? http://wordpress.stackexchange.com/questions/14306/using-wp-query-is-it-possible-to-orderby-taxonomy – Benoti
흠 괜찮아요, 조금 바보 같아요. 내가 그걸로 일하는 것이 완벽 할거야. – Aaron