ShortCode Content

DearPDF shortcode takes two types of inputs. Content and Options. Content can be used to change the display text for popup flipbooks. Options can used to set basic option for the viewer directly.

This can be used in setting the text on popup button/thumb/link

1. By default, related post title is displayed #

[dearpdf id="69" type="button"][/dearpdf]
[dearpdf id="69" type="thumb"][/dearpdf]
[dearpdf id="69" type="link"][/dearpdf]  

Output:

Private: GLFW Manual Vertical
Private: GLFW Manual Vertical
Private: GLFW Manual Vertical

If there is no title added to flipbook post "Open Book" is displayed:  
Open Book

2. If content is provided that is taken as priority #

 [dearpdf id="69" type="button"]Custom Text for Button[/dearpdf]
 [dearpdf id="69" type="thumb"]Custom Text for Thumb[/dearpdf]
 [dearpdf id="69" type="link"]Custom Text for Link[/dearpdf]

Output:

Custom Text for Button
Custom Text for Thumb
Custom Text for Link

3. Custom Content #

 [dearpdf id="69" type="custom"]HTML Content[/dearpdf] 

Adding Image as popup trigger to open Lightbox popup.

Output:

Click on this image! -> DearPDF Icon

The image above can open a PDF Viewer!


4. Custom content multiple blocks: #

This is totally a hack which works somehow.

dearpdf shortcode spanning multiple Gutenberg blocks

Output:


Paragraph Content and Multiple blocks

DearPDF Icon


Leave a Reply

Your email address will not be published.