• Resolved Marlimant

    (@marlimant)


    Hello (and thanks for the excellent plugin):
    It’s possible that the QR Code links to %post_id% ignorating the the custom permalink structure defined by WordPress?

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author shawfactor

    (@shawfactor)

    you could achieve this easily by just using the shortcode

    eg: echo do_shortcode( ‘[lh_qr_code text=”%post_id%”]’);

    or by dirfectky linking to the qr code genereator on your site

    eg: https://yoursite.com/lh_qr_codes/?text=%post_id%

    Hopefully you understand what I am saying?

    • This reply was modified 7 years, 7 months ago by shawfactor.
    Thread Starter Marlimant

    (@marlimant)

    Thanks for the answer.
    The first suggestion has not changed the custom url.
    I think I do not understood the second.
    But I made it using this code:
    <?php $post_id = get_the_ID (); echo do_shortcode ("[lh_qr_code format = 'png' text = 'https: //www.mysite.com/?p=$post_id']"); ?>

    If you can improve it, your suggestions will be welcome as usually.

    Best regards,
    Javier.

    • This reply was modified 7 years, 7 months ago by Marlimant.
    Plugin Author shawfactor

    (@shawfactor)

    Do you know HTML?

    I ask as the script that generates the qr is located at:

    https://yoursite.com/lh_qr_codes/?text=%whatever+text+is%

    so just replace the text you want to link to with whatever

    e.g. check out the qr at one of my sites:

    https://princesparktouch.com/lh_qr_codes/?text=%do+you+understand+me%

    Thread Starter Marlimant

    (@marlimant)

    I understand now thanks.
    It just just pasting % post_id% at the end of the statement was not generated the post id.

    Finally I found out this code that generate the post ID with a more short way (inside of the loop)

    <? php echo do_shortcode ("[lh_qr_code format='png' text='https://www.mysite.com/? p=$post->ID'] "); ?>

    Thanks for the support, it is working perfectly.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Post ID URL’ is closed to new replies.