• Resolved tgilber007

    (@tgilber007)


    I have a custom link in that format
    $custom_url = the_permalink();;

    I tried this but it not work

    <?php echo do_shortcode(‘[mycred_link amount=1 href=”‘.esc_url($custom_url).'” target=”_blank”]View[/mycred_link]’); ?>

    https://prnt.sc/yOZH10zSyYIt

    what is the correct shortcode?

Viewing 2 replies - 1 through 2 (of 2 total)
  • A.Tariq

    (@arsalantariq)

    Hi @tgilber007,

    Thank you for contacting us, Please use the below-shared code also do let us know how it is working for you.

    $custom_url = get_the_permalink();
        echo do_shortcode('[mycred_link amount=1 href="' . esc_url( $custom_url ) . '" target="_blank"]View[/mycred_link]');
    Thread Starter tgilber007

    (@tgilber007)

    Thanks @arsalantariq Now it works well

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘pass link in href’ is closed to new replies.