Shortcode button

QuestionsCategory: PDF Light ViewerShortcode button
Will Radford asked 1 year ago

Have you guys ever added a shortcode button in the wordpress editor? Maybe just a file list by pdf number?
If not, can you pint me to a hook that will list files or file numbers?
Will R.

1 Answers
supportsupport answered 1 year ago

Hello Will,
Thank you for your message.
We didn’t add shortcode button for the editor.
If I understood you correct, then you can simply query PDFs by custom post type `pdf_lv` (or `PdfLightViewer_PdfController::$type`), for example:

$params = array(
    'post_type' => PdfLightViewer_PdfController::$type,
    'post_status' => 'publish',
    'nopaging' => true,
    'order' => 'desc',
    'orderby' => 'date'
$query = new WP_Query($params);