• Resolved sebbbl

    (@sebbbl)


    Hi,

    I’m trying to use gamipress_link in a custom template with a do_shortcode, but I can’t get it to work, here’s my code :

    $gamipress = do_shortcode('[gamipress_link href="'.$link.'?utm_source=mywonderfulwebsite&utm_medium=link" label="Click here." target="_blank" title="Click here"]');
    $result = '<div class="container-fluid text-center"style="padding-top:1%;"><p>Website is loading, please wait. If it doesn't work, '.$gamipress.'</p></div>';

    Link opens in a new tab as expected, but points are not added.

    Do you have any clue ?

    Thanks in advance,
    Seb.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @sebbbl

    Is possible that Link script (which handles the award process) doesn’t gets enqueued using this way

    Try to force this script enqueuing by adding this line:

    
    add_action( 'wp_enqueue_scripts', 'gamipress_link_enqueue_scripts', 100 );
    

    Also, you should check how have you configured your points award, and if the link configuration matches your points award setup

    For example, if you have setup the event “Click on a link with a specific identifier” check that you are passing exactly the same identifier (id attribute) to the [gamipress_link] shortcode

    Best regards

    Thread Starter sebbbl

    (@sebbbl)

    Thanks for your answer. I tried to force the script, but no more results. Reward is set up to “click any link”.

    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @sebbbl

    Points awards has a field to limit the number of times the user can earn the amount of points, have you checked this setting? (Its behind the points amount field)

    Also, have you tried to place the shortcode in a post/page content?

    If none of the previous solutions work, then is possible that there is a conflict with your theme or a plugin so the most recommended is to perform a conflict test to check that any other script is blocking our add-on functionallity

    Best regards

    Thread Starter sebbbl

    (@sebbbl)

    Shortcode works fine in a standard page or post, settings are ok.

    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @sebbbl

    Then you need to investigate by yourself why is not working in the custom way you want because we can only provide support only in the standard way

    Best regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘do_shortcode ?’ is closed to new replies.