• I am using php echo do_shortcode(‘[wp_ulike for=”post” id=”1″ style=”wpulike-heart”]’);
    but replacing id=”1″ with id=”{{media_id}}”
    I am using this with Ultimate Member Gallery (um-gallery-pro).
    When a member uploads a media file which is either an image or video, an id number is generated. I am capturing that id number with {{media_id}}. When I do an element inspect, it shows the id number, as if I hard coded it in.
    The issues I’m having is the like is counted as +2, disappears when you refresh the page, but recognized that you’ve already liked this when you try to like it again.
    If I hard code the id=1″, id=”2″, etc.. it works just fine. I know it recognizes the {{media_id}}, but not sure why it’s not working correctly.

  • The topic ‘php with generated ID number’ is closed to new replies.