Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • leonardopenna
    Participant

    Can I trigger the hook manually (in my code)? Thanks

    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!

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