WordPress.org

Support

Support » How-To and Troubleshooting » Post order is not alphabetical in a custom post type

Post order is not alphabetical in a custom post type

  • Hello,

    Someone programmed a specific plugin for a product catalog and uses custom post type. The problem is that the post are not displayed in alphabetical order on the frontend, this also includes the search results for the specific posts. (it is shown in alphabetical order in the backend).

    This is driving me crazy….

    Is there a workaround for this?

    Looking forward to a solution for this. I hope someone can point me in the right direction..

Viewing 2 replies - 1 through 2 (of 2 total)
  • It is probably sorting by publication date. Take a look at the CPT post query and modify the sort parameter.

    The line to look for (or ADD) is:

    'order_by' => 'post_title'

    (if the line is visible it will probably say ‘post_date’ instead of ‘post_title’, so change it into ‘post_title’ and your good.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post order is not alphabetical in a custom post type’ is closed to new replies.
Skip to toolbar