deiwee
Forum Replies Created
-
Okey you can combine meta-key values with javascript like this:
$(function() { $('#basic').click( function() { var data ={}; data['repeater'] = 'default'; data['post-type'] = 'post'; data['posts-per-page'] = '8'; data['meta-order'] = 'DATE'; data['category'] = 'May'; data['meta-key'] = 'country:offerprice'; data['meta-value'] = 'Turkey' + ':' + 400 + ',' + 450; data['meta-compare'] = '=:BETWEEN'; data['meta-type'] = 'CHAR:NUMERIC'; data['meta-relation'] = 'AND'; ajaxloadmore.filter('fade', 250, data); }); });Or with hyperlink:
<a href="#" data-repeater="default" data-post-type="post" data-posts-per-page="8" data-category="May" data-meta-key="country:offerprice" data-meta-value="Turkey:400,450" data-meta-compare="=:BETWEEN" data-meta-type="CHAR:NUMERIC" data-meta-relation="AND" >Egiptas </a>Forum: Plugins
In reply to: [Ajax Load More – Infinite Scroll, Load More, & Lazy Load] ACF Date CompareHello, @dcooney, thank you!
After using:
add_filter('alm_debug', '__return_true');Found that meta_query type was CHAR. Mistake was in my ahref link here:
data-meta-operator="NUMERIC" // Should be data-meta-type *facepalm*This mistake trolling from this example Date Comparison
I thinks:
meta_operator="DATE:DATE"
Should be
meta_type="DATE"Thank you again 🙂
Forum: Plugins
In reply to: [Ajax Load More – Infinite Scroll, Load More, & Lazy Load] ACF Date CompareMaybe this is same bug, but I get strange sorting problem.
I have posts with ACF [price], prices goes from 200 – 1048. When I use link to filter values, I always get values >1000 too.
Example:
<a href="#" data-repeater="default" data-post-type="post" data-category="" data-posts-per-page="8" data-category--not-in="10" data-meta-key="price" data-meta-value="240" data-meta-compare="lessthan" data-meta-operator="NUMERIC" data-order="ASC" data-orderby="meta_value_num" >Price is less than 240 </a>I get post with 220, 224, 1001, 1048. If I change posts price field from 1048 to 999, they not appear in filter. Even if I do between 1-200 I still get values more than thousand too. In database values are clean, without any characters. But If I try to get values in short code it works:
echo do_shortcode('[ajax_load_more post_type="post" meta_key="price" meta_value="240" meta_compare="lessthan" meta_type="NUMERIC" order="ASC" orderby="meta_value_num" posts_per_page="4" button_label="More Events"]');What I missing here? 🙁
Forum: Plugins
In reply to: [Ajax Load More – Infinite Scroll, Load More, & Lazy Load] ACF Date CompareWhow fast support! 🙂
For now I managed to “fix” this like that:
$start_date = '20191001'; // October 1, 2019 $end_date = '20191031'; // October 31, 2019 echo do_shortcode('[ajax_load_more post-type="post" meta_key="event_starts" meta_value="'. $start_date .','. $end_date .'" meta_compare="BETWEEN" meta_operator="DATE" ]');I don’t know why but “meta_value” multiple objects work only with comma (examples I found was with colon). Thanks again, I will be waiting for update.
Regards.
Same thing for me. When you use Remove option, plugins creates tables again, and after removing, leaves tables in database.
Forum: Plugins
In reply to: [Geolocation IP Detection] Remove “Data from:” in emailSolution: I commented shortcode.php 341 and 342 lines.