Home › Forums › WTI Like Post PRO › Post grid assorted by meta data
- This topic has 3 replies, 2 voices, and was last updated 5 years, 6 months ago by justinl.
November 16, 2017 at 9:37 pm #596
I could use some help integrated the sort by _wti_like_count on my grid widget.
My grid widget has the ability to sort by this meta data and I am using the pro version – yet, it is not working properly.
What am I missing?November 17, 2017 at 7:20 pm #601WebtechideasKeymaster
Can you please explain a bit more when you say “it is not working properly”? It’s quite difficult to understand as there is not enough information.
– Were you previously using the lite version and now have started using the pro version?
> If this is the case, then you might already have some posts in your system which do not have the meta data for the like count. So go to our plugin setting page end section where you will find the button which says “Update Like Meta”. Hit this button and it will add the necessary like data to post meta field.
– Have you created the widget or that comes from the theme?
> We are not sure about the widget code. The like meta data contains numeric value. So the standard order by will not work. It has to be
'orderby' => 'meta_value_num'. The basic query for such numeric sorting looks like below.
new WP_Query( array( 'post_type' => 'post', 'posts_per_page' => get_option('posts_per_page'), 'paged' => 1, 'meta_key' => '_wti_like_count', 'orderby' => 'meta_value_num', 'order' => 'DESC' ) );
Please check and let us know.
ThanksNovember 17, 2017 at 9:30 pm #602
I understand I did not give much information, I was not sure what you needed and didn’t want to waste your time with irrelevant information. I want to order my posts by like count.
My DNS has propagated , here is my post grid page http://greatlitrpg.com/best-litrpg-book-list/
I reset the like counts and re-voted, it lead to no change in the post order. The button actually said, “Reset All Counts”. Looked all over for, “Update Like Meta” but did not find it.
I am using the “Post Grid” plugin that comes with “the7” theme. In the plugin setting I have it “order by” – meta value number and “meta key” – _wti_like_count
I am not sure how to add a query but I can manage to add some code to my files via FTP if you have explicit instructions
Again, thanks for your time. I would be happy to send a great review if we can get this to work. It has been a thorn in my sides for awhile.November 22, 2017 at 1:09 am #606
It looked like it was working for a bit but I created more posts to rank. I delete all the old ones and made six new ones, keeping the post grid settings the same. I also updated the like meta data. It doesn’t seem to be ranking correctly. The first book is the correct as it is the only one with two votes. Everything after is a mix of 1 or 0 votes randomly.
Is there anything else I need to do?
- The forum ‘WTI Like Post PRO’ is closed to new topics and replies.