반응형
Wordpress query_posts 사용자 지정 필드별 순서 지정
사용자 지정 필드별로 query_marget 함수를 사용하여 결과를 주문하려고 합니다.
편집된 query_posts() 함수는 다음과 같습니다.
query_posts( "post_type=produkte&".$query_string."&orderby=Price&order=DESC" );
가격은 {Euro}와 같습니다.예를 들어 1.49와 같은 {Cent}입니다.
그리고 query_posts() 함수는 순서가 맞지 않습니다.결과는 다음과 같이 정렬됩니다.
0.49, 1.99, 0.99
뭐가 잘못되고 있습니까?
미리 감사드립니다!
이 방법을 사용해 보십시오(온라인에서 작동/찾을 수 있기를 바랍니다).
query_posts( "post_type=produkte&".$query_string."&meta_key=Price&orderby=meta_value_num&order=DESC" );
SO에 대한 또 다른 답변.
언급URL : https://stackoverflow.com/questions/10970566/wordpress-query-posts-order-by-custom-field
반응형
'programing' 카테고리의 다른 글
MySQL(MariaDB):삭제해야 합니다.MySQL(MariaDB):삭제해야 합니다.문자열에서 \n문자열에서 \n (0) | 2023.09.12 |
---|---|
가려진 배경 영역의 밝기에 따라 텍스트 색상을 변경하시겠습니까? (0) | 2023.09.12 |
Oracle JDBC Optimization : Spring boot Application에서 Prepared Statement 캐싱 활성화 (0) | 2023.09.12 |
스프링 기본값으로 소비 및 생산 (0) | 2023.09.12 |
Oracle 기본 데이터 펌프 디렉토리를 덤프 파일을 가져오도록 변경하는 방법은 무엇입니까? (0) | 2023.09.12 |