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.
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.
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%
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.