Home Forums Front-end Issues Shortcode in Url ? Reply To: Shortcode in Url ?

  • Hi @aleccs

    Here’s an example how to do it:

    $my_number = get_field('mynumber');
    echo do_shortcode('[add_to_cart_url id=' . $my_number . ']');

    Please keep in mind that you need to put it inside The Loop.

    If you have time, please learn more how the template works here:

    If you don’t have time to learn it, I suggest you hire a developer to help you out with it, and I’d recommend looking for one on or

    I hope this helps 🙂