$.fn.almFilter bug when using parameters containing underscores
-
I noticed that I couldn’t get
$.fn.almFilterto work when I passedmeta_key,meta_value, andmeta_compare…So I looked at the code and found that in the
$.fn.almSetFiltersfunction, specifically on line 835 of ajax-load-more.js, you are doing a regex to clean up the shortcode parameter names. However, this regex is not catching and converting the underscores to dashes. So when I pass shortcode params that have underscores, they are being ignored by the ajax function because, for instance, it is expectingmeta-keyinstead ofmeta_key. (line 341).I worked around this by just passing my parameter key names with the dashes instead of underscores. But this is definitely a hack and not what the documentation describes.
Cheers.
The topic ‘$.fn.almFilter bug when using parameters containing underscores’ is closed to new replies.