Title: Numeric sorting (order by)
Last modified: August 27, 2019

---

# Numeric sorting (order by)

 *  Resolved [euacuz5efp81gih4e1hv](https://wordpress.org/support/users/euacuz5efp81gih4e1hv/)
 * (@euacuz5efp81gih4e1hv)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/numeric-sorting-order-by/)
 * I use the Advanced Custom Fields and List category posts plugins on my site.
   
   In the Advanced Custom Fields plugin settings, the “Object Fields” group is created
   for entries with the “Sequential Number” field (type: Number). Wishing to display
   the records on a separate page with sorting by the “Sequence Number” field, I
   had a problem. Sorting is performed as text, not numbers, i.e. sorting looks 
   as follows: 1 10 100 11 20
 * The page contains the following tag:
    [catlist id=1+4 customfield_orderby=sortnum
   order=asc]
 * What needs to be corrected for correct sorting of the view:
    1 10 11 20 100
 * _#################_
 * На сайте мной используются плагины Advanced Custom Fields и List category posts.
   
   В настройках плагина Advanced Custom Fields создана группа “Поля объектов” для
   записей с полем “Порядковый номер” (тип: Число). Желая вывести записи на отдельной
   странице с сортировкой по полю “Порядковый номер”, столкнулся с проблемой. Сортировка
   производится как текста, а не как числа, то есть сортировка выглядит следующим
   образом: 1 10 100 11 20
 * На странице указан следующий тег:
    [catlist id=1+4 customfield_orderby=sortnum
   order=asc]
 * Что требуется поправить, для корректной сортировки вида:
    1 10 11 20 100

Viewing 1 replies (of 1 total)

 *  Thread Starter [euacuz5efp81gih4e1hv](https://wordpress.org/support/users/euacuz5efp81gih4e1hv/)
 * (@euacuz5efp81gih4e1hv)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/numeric-sorting-order-by/#post-11879255)
 * Problem solved:
    lcp-parameters.php $args[‘orderby’] = ‘meta_value_num’;

Viewing 1 replies (of 1 total)

The topic ‘Numeric sorting (order by)’ is closed to new replies.

 * ![](https://ps.w.org/list-categories/assets/icon-256x256.png?rev=2517918)
 * [List categories](https://wordpress.org/plugins/list-categories/)
 * [Support Threads](https://wordpress.org/support/plugin/list-categories/)
 * [Active Topics](https://wordpress.org/support/plugin/list-categories/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-categories/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-categories/reviews/)

## Tags

 * [numeric](https://wordpress.org/support/topic-tag/numeric/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)

 * 1 reply
 * 1 participant
 * Last reply from: [euacuz5efp81gih4e1hv](https://wordpress.org/support/users/euacuz5efp81gih4e1hv/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/numeric-sorting-order-by/#post-11879255)
 * Status: resolved