Title: sorting dissapears on adding any code to custom fields
Last modified: November 28, 2022

---

# sorting dissapears on adding any code to custom fields

 *  Resolved [pczjrh](https://wordpress.org/support/users/pczjrh/)
 * (@pczjrh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/sorting-dissapears-on-adding-any-code-to-custom-fields/)
 * Hi,
    I’ve got tables that I’d like to sort by date. the data is formatted as 
   01/01/2022 in each cell in column 2 (i.e. the second one). If I add any of the
   suggested sorting code such as
 * “columnDefs”: [ { “type”: “date-eu”, “targets”: [ 1 ] } ]
 * the sorting on all tables on the page dissappears.
    I’m adding this to the section
   called “Custom Commands:” – is this the right place? Do you have any other suggestions?
 * Cheers,
    Jason.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/sorting-dissapears-on-adding-any-code-to-custom-fields/#post-16242219)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * One common problem here is the use of the correct quotation marks. Sometimes,
   copy/pasting can result in the wrong ones being used. Can you therefore please
   check if the quotation marks in the “Custom Command” are upright `"` ones, and
   not curly `“` ones?
 * Also for the `date-eu` date format, did you download, install, and activate the
   TablePress Extension from [https://tablepress.org/extensions/datatables-sorting-plugins/](https://tablepress.org/extensions/datatables-sorting-plugins/)?
 * If all that does not help, can you please post a link to the page with the table
   where this problem happens, so that I can take a direct look? Thanks!
 * Regards,
    Tobias
 *  Thread Starter [pczjrh](https://wordpress.org/support/users/pczjrh/)
 * (@pczjrh)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/sorting-dissapears-on-adding-any-code-to-custom-fields/#post-16242509)
 * Hi,
    Yep, it was the quotes. So difficult to see them, and I copied the code 
   from this forum. Anyway, they are sorted now. Thank you very much for the quick
   reply and fix 🙂 Cheers, Jason.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/sorting-dissapears-on-adding-any-code-to-custom-fields/#post-16243109)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias   P.S.: In case you haven’t, please rate TablePress [here](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   in the plugin directory. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘sorting dissapears on adding any code to custom fields’ is closed to 
new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/sorting-dissapears-on-adding-any-code-to-custom-fields/#post-16243109)
 * Status: resolved