JackDavis
Forum Replies Created
-
i hope it won’t be premium function for pay as all in this plugin…….
Same here. For category page I can not use %%category_description%%.
I solved by custom modification, I think that your code can be used only for sorting same meta_value as meta_key.
Solution:
Before this:// WP_Query() $alm_query = new WP_Query( $args );I added this:
$args['meta_key'] = $s; //I do not use search argument, so I deleted him from code and used as one more value for my sorting. $args['orderby'] = $orderby; $args['order'] = $order;In $args = array I commented lines with ordering:
`
//’order’ => $order,
//’orderby’ => $orderby,
`And shortcode is simply:
echo do_shortcode('[ajax_load_more //filter posts post_type="myposts" //show just posts with _single_status == 5 meta_key="_single_status" meta_value="5" meta_compare="'==" //order posts with _single_status == 5 by _single_stats ascending search="_single_stats" orderby="meta_value" (meta_value_num dont work for me, this work perfectly) order="asc" //other stuff posts_per_page="6" pause="true" scroll="false" button_label="More"]');In documentation I see that there are more ways to have wp_query so maybe your solution does not support sorting by other meta_value. I dont know, I am newbie in WP, but by this way, it works. 🙂
In any case, thank you for your support.
No, by this way I have no results.
Yes, I read and tried but I dont know how to use that, because I have double definition of “meta_key”. See below please:
echo do_shortcode('[ajax_load_more //filter posts post_type="myposts" //show just posts with _single_status == 5 meta_key="_single_status" meta_value="5" meta_compare="'==" //order posts with _single_status == 5 by _single_stats ascending meta_key="_single_stats" orderby="meta_value_num" order="asc" //other stuff posts_per_page="6" pause="true" scroll="false" button_label="More"]');By this way maybe works the ordering (I will test), but the first filter (show just posts with _single_status == 5) does not work at all.
E.g. ordering by date (newest) works fine, but the _single_stats or _single_date (numeric values) looks like random ordering.
*
meta_compare=”==”Please see this specific example:
echo do_shortcode('[ajax_load_more //filter posts post_type="myposts" //show just posts with _single_status == 5 meta_key="_single_status" meta_value="5" meta_compare="'==" //order posts with _single_status == 5 by _single_stats ascending orderby="_single_stats" order="asc" //other stuff posts_per_page="6" pause="true" scroll="false" button_label="More"]');Is the part with ordering correct or what may I change? Because I does not use “meta_value_num” in my meta_query args and it works correctly.
Thank you, but what is “meta_value_num“? When I set orderby=”_single_stats”, I have no results.
Please check my demonstration to get what I mean:
http://i62.tinypic.com/k6omt.jpgI see that it was solved here: https://ww.wp.xz.cn/support/topic/order-by-meta-value-2?replies=3, but I can not find the ticket on Github. Did you already implemented this function or must I modify the plugin to get it? Thank you.
Pity, though, thanks for support! 🙂
I mean something like that:
$args = array( 'meta_query' => array( 'relation' => 'AND', array( 'key' => '_single_foo', 'value' => strtotime("now"), 'compare' => '>=', 'type' => 'UNSIGNED' ), array( 'key' => '_single_foo2', 'value' => '1', 'compare' => '==', 'type' => 'UNSIGNED' ) ) );Hello, thank you very much for support, everything works fine. Just one small question – is possible to load posts by Multiple Meta Entries? I hope so, but I did not found anything about that in the documentation.
Thanks.
* div instead of ul
Wow, thank you, it works. Awesome. Also, I set Container Type as <div> instead of
- .
Just 2 problems:
– GD Star Rating plugin buggy, I removed it so no problem about that. (it load just one post, stop on star rating placement and does not load anymore),
– I have button in each post and when user click on the button, it will show $code. It does not work in posts loaded by Ajax Load More (I click, but no $code echo there). It uses:<span class="input button border high secondary responsive hidden_coupon">Firebug show that this span class was loaded succesfully. Do you think where can be problem please?