Home / Forums / You Theme Support / Use Number of Post Likes To Order Posts

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts

  • awesome
    Participant

    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.

    Hi @norsam

    I checked the theme codes and it looks like the variable used is
    meta_like

    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.

    Regards,


    awesome
    Participant

    Hey Edcel,

    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?


    awesome
    Participant

    Hey Edcel,

    I don’t know whether it worked on your end but meta_like doesn’t work for ordering posts.

    Hi @norsam

    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?

    Regards,


    awesome
    Participant
    This reply has been marked as private.

    Hi @norsam

    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.

    Regards,


    awesome
    Participant

    Thanks a lot

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.