D
D
Dmitry Zhukov2018-08-14 19:45:20
WordPress
Dmitry Zhukov, 2018-08-14 19:45:20

How to implement a QR code in Wordpress?

Good afternoon.
The task is as follows: it is required to generate a QR code for each article on the site (that is, the code must contain a link to a specific material) with the subsequent ability to print a list of codes (stickers with these codes will be made).
What solution can you recommend?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur Witt, 2018-08-15
@dreamfdr

Run this in the root of the site
cat and edit post_per_page for yourself, of course

<?php
require_once( 'wp-load.php' );

$args = array(
  'cat' => 2,
  'posts_per_page' => 100
);

$query = new WP_Query( $args );

if ( $query->have_posts() ) {
  while ( $query->have_posts() ) {
    $query->the_post();
    echo "<img src='http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl=".get_permalink()."'><p>".get_the_title()."</p><hr>";
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question