Custom Query Fields – Altering Meta Value

I’ve had a brief look at the plug-in, it offers no hooks to do this, but you could use posts_clauses hook to alter the query. That said my SQL is not good enough to say how (if it’s possible) to convert the ‘human readable’ value to a decimal, prior to sorting.

Even if it could, my suggestion would be to store the value in a decimal format, and then convert it to ‘human readable form’ when displaying to the user.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)