QR Code for each post and page

  • sanuja.com

    #7421

    I am trying to add a QR code to each Page and Post with

    <img alt="QR code" src="http://chart.apis.google.com/chart?cht=qr&chs=150x150&chld=L|4&chl=<?php the_permalink(); ?>" width="150" height="150" />

    I tried using the Action Hooks and it won’t work. What I would like to see a QR code on the Widget area to the left, it it won’t appear on mobile version. I even tried editing the functions.php on both child and main theme with no results.

    This is not a Graphene specific question. Just asking it here since all of you are better at programming than I am.

    Yes I know there are plug-ins for this, but I would like to have fun in coding myself. 🙂

    Thanks.

    Mod

    Kenneth John Odle

    #38156

    You are using PHP to generate the URL, so it won’t work inside a normal text widget. Did you try this inside a PHP widget?

    sanuja.com

    #38157

    Hum… Let me try that right now and get back to you. Thank you Kenneth!

    UPDATE: YES! It worked…. without editing any function files and such. I used, http://wordpress.org/extend/plugins/php-code-widget/ and it seems to be a light weight one.

    (I am not a fan of installing a lot of widgets to avoid code conflict, but I think this is OK)

    sanuja.com

    #38158

    Is there way to make a widget only appear on Pages and Posts and hide it on search, tags, etc?

    Admin

    Syahir Hakim

    #38159

    Moved to Support. Please post in the correct section next time.

    Quote:
    Is there way to make a widget only appear on Pages and Posts and hide it on search, tags, etc?

    Use the Widget Logic plugin.

    sanuja.com

    #38160
    Quote:
    Widget Logic

    THANK YOU!

    adfsafw

    #38161

    Hi, guys, can I post a question about creating QR Code for web? I am now considering to do this. And I need a QR Code generator. I googled and found this ASP.NET QR Code generator which supports to do this. Is this good? I read over and over again the description and the guide of creating barcode in ASP.NET, I am a little confused. How can I do this.

    sanuja.com

    #38162
    Quote:
    Hi, guys, can I post a question about creating QR Code for web? I am now considering to do this. And I need a QR Code generator. I googled and found this ASP.NET QR Code generator which supports to do this. Is this good? I read over and over again the description and the guide of creating barcode in ASP.NET, I am a little confused. How can I do this.

    Why not use the trusted Google QR service?http://chart.apis.google.com/chart?cht=qr&chs=150x150&chld=L|4&chl=YOUR_LINK_HERE

    OR

    http://chart.apis.google.com/chart?cht=qr&chs=150x150&chld=L|4&chl=<?php the_permalink(); ?> will take the the URL from the HTTP of the page, but will require a PHP code widget.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.