Hi Acoda Team,
I would like to display posts from the highest number of likes to the lowest using a post grid in Visual composer. There is an option to order posts by a Meta value or Meta value number in the post grid settings. However, I need to input the meta key to specify the meta value. May you please tell me what meta key I should use to specify post likes?
Secondly, I would like to display the number of likes that each post has in the post grid using my custom grid item template. How can I achieve this?
Thanks a lot for your support.
I checked the theme codes and it looks like the variable used is
Can you please try it?
For your second concern, there is no easy way to do it via the Grid Builder because there is no element for the “likes” you can add to the grid. The best option would be to custom-code the grid.
There is a way to add custom elements to visual composer as shown here: https://wpbakery.com/video-academy/add-shortcodes-wpbakery-page-builder-wordpress/
The theme already has the like functionality coded into it so it would jist be a matter of mapping certain things correctly in the settings. I just don’t have that much knowledge about the theme to accurately map the likes function as a new shortcode. Can you help me with the data that I should put in the fields to map the like shortcode?
As far as I know, the Shortcode Mapper only works on existing shortcodes, so first, you must install a shortcode plugin that will display post likes so you can integrate it using the Shortcode Mapper. This is considered advanced customization which we do not support.
For the meta key, I actually did not test it as my test site did not have any relevant info to test the meta key on. Can you please send over your site’s URL and login credentials so we cen test this further?
I have tested a few more meta keys and it still did not work. I have forwarded this to the developer to confirm if there’s a meta key assigned to the post like variable.
I will get back to you once I have information on this.
You must be logged in to reply to this topic.