Home Forums WTI Like Post PRO Is the post meta available only for the liked/disliked posts? Reply To: Is the post meta available only for the liked/disliked posts?

#661
leonardopenna
Participant

Hello!

For my case scenario, it’s important to list the posts with 0 votes, putting them at the end of the list.

I tried to hit the “Update Like Meta” button, without results. But even if it had worked, it would be a manual workaround. I need to automatically generate metadata (_wti_like_count) for the posts when the user creates them.

Right now, I’m using WTI Like Post PRO together with Search & Filter Pro. I just need to choose the post meta that will be used as a sorting parameter.

Maybe I can trigger the post meta creation when saving a post? I already use a function to customize a few things:

add_action(‘acf/save_post’, ‘save_practice’, 20);
function save_practice($post_id) {
$post_type = get_post_type($post_id);
if ($post_type != ‘practice’) {
return;
}

}

Thanks again!