Answer taken from here: meta_query: using BETWEEN with floats and/or casting to DECIMAL
add_filter('get_meta_sql','cast_decimal_precision');
function cast_decimal_precision( $array ) {
$array['where'] = str_replace('DECIMAL','DECIMAL(5,2)',$array['where']);
return $array;
}
Related Posts:
- Is there anything that Joomla or Drupal can do that can’t be done in WordPress? [closed]
- Any post install tips after installing WordPress 3.0.1?
- Version Control: Entire site or just pieces?
- Getting a stack trace when an error occurs?
- Customizing the Subject Field in WordPress’ Notification Emails?
- How to move wp-content (or uploads) outside of the WordPress directory
- how to redirect to a custom password retrieval page
- Maintaining synced staging/production WP sites
- WordPress Multi Site Best Practice
- Sub posts and non unique post_name
- How to let a single post have its own domain name
- page_template toggle between 2 templates + 2 permalinks for same post
- Redirect to requested page after (custom) login
- Page load requires a trailing “/” [closed]
- How to instantly delete posts/pages permanently?
- dynamic external javascript generated using php
- Show Custom Taxonomy Slug(s)?
- How to re-arrange media uploaded using : media_handle_upload() as per year / month
- How could we customize the all posts page in the admin panel?
- How do I perform a “get” call to an external API, and then display the JSON results on a page in my WordPress site?
- How to build a child theme from a react-based parent theme?
- What’s the proper way to use a custom table? [closed]
- How to retrieve the value stored in a multi-dimensional array and SUM the entries?
- Adding Pagination on a Custom Author Page
- How can I get the page url slug when ‘post_name’ returns an id?
- Woocommerce Product page edit
- Convert an theme options page to use in customize.php also?
- Setting up Different Layouts for Each Product Category and Subcategory [closed]
- Prevent access to custom login page for logged in users
- Remove template drop down for certain pages
- Adding all sub-pages to the menu manager
- Hide devices selection from customizer?
- Add options to the “Screen Options” section on the “Menus” editor
- Split Conference WordPress Page in different years
- Make custom user table column filterable
- How I display post of the post type group by year of post?
- How to update preview when custom setting changed in my custom widget
- Side by side blogging?
- how to get the categories for a single product in a hierarchical way
- large chunks of text went missing
- How to change popular term checklist title when edit post?
- Extra theme – header customization help [closed]
- Disable widgets in customizer for sidebar
- Save & Publish disabled for two dimensional array Customizer
- Deep customization of wp-login.php
- Custom CSS at Appearance > Edit CSS is missing after update [closed]
- How to store page visit counts?
- How to solve this problem with my subdomain?
- Load File (Function & Variable Value) from Child Theme
- Featured Image If Else Condition
- how to add custom logo to my template
- WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me
- I want to print a message in post ” After one month from publish date”
- How to query details of images in gallery that is attached to a post
- WordPress Child Theme Stylesheet being loaded before Parent’s minified .css
- How to create custom search page
- Where to store reusable content that is not a page
- WordPress broken after changing URL
- How to make the Pages in WordPress Customized?
- Custom “wp_login.php?action=lostpassword” and reset password
- Custom theme – how to link the image without posting it
- wp_enqueue_script JS code runs too late (after user begins interacting)
- Get custom text if in Category
- Conditional Logic on CF7 dropdown options
- Change admin_title of a plugin using code snippet/functions
- Validate user login in php
- optimal taxonomy or custom post types
- Easily add custom HTML outside the main container?
- Adding a custom field to a slug
- Query Product categories what have a custom field
- How to create custom backend admin menu in different languages?
- Make Widget appear on Dashboard
- Delete page titles
- Woocommerce dependent attributes
- WordPress Customizer: Check for value of CSS selector and replace it
- How to add custom Author Info Box to blog posts “only” and NOT custom post templates
- Bio comes up when the visitor clicks on a picture
- How to find and replace (or add) specific word in a specific category?
- Creating a Treeview Listing of a Directory
- WooCommerce – Adding custom HTML to specific product pages
- How do I move my sites to a child theme without loosing customisation?
- Displaying all Custom fields on post except some
- WordPress Install – “end of script output before headers” when running simple php script
- How to create new page can get custom field other post in wordpress
- How to appoint different users to different pages?
- How to replace part of shortlink with nothing
- Is there a way to hide a user’s posts from their Activity feed?
- customize footer widgets area
- Setting up staging area
- Accessing + retrieving custom database in WordPress
- updated permalink structure on localhost does not work
- Word Press Theme Customiser and Child theme Function.php
- Security Issues with custom user role or changing core role capabilities?
- adding new html css to wordpress section from codepen [closed]
- Do i need to use PHP in customizer api?
- Add variable : 1 Week ago
- When is it OK to create a custom table for a plugin? [duplicate]
- User Query Multiple Orderby Clause
- How to display product variations on same row
- Create a page for each database table entries