Sources:
- https://wordpress.org/plugins/interactive-3d-flipbook-powered-physics-engine/
- https://3dflipbook.net/wp-overview
- https://3dflipbook.net/question?id=2872
No need to add the pdf as a book first. You can use the shortcode generator or just manually create a shortcode like below, where:
- pdf=”urlto.pdf” – full url to the pdf in the media librar
- classes=”et_pb_button” – one or more classes. Use et_pb_button to style the link as the default Divi button
- trigger=”flipbook” – enter a trigger that can be used as a class on other elements to open the flipbook with a normal hyperlink or button. For example:
- To open the flipbook with a regular Divi button, use # as the button target and add ‘flipbook’ to advanced » CSS field.
- To open the flipbook with a hyperlink in a paragraph of text, use <a href=”#” class=”flipbook”>Flipbook link</a>
- In both cases, the shortcode must also be on the page to load the javascript, but you can hide it with display:none.
- urlparam=”page” – to open the Flipbook with a url parameter such as https://mywebsite.com?page=5 where 5 is the page on which it should open
- without urlparam in the shortcode the plugin uses the default ‘fb3d-page’ as in https://mywebsite.com?fb3d-page=5
- page-n=”5″ – the page number on which the deeplink should open
Note: the flipbook does not work when you are logged-in to WordPress!
Shortcode with default Divi button style
[3d-flip-book mode="link-lightbox" classes="et_pb_button" pdf="urlto.pdf"]Button Text[/3d-flip-book]Code language: CSS (css)
Shortcode to open with a trigger
[3d-flip-book pdf="urlto.pdf" trigger="flipbook" urlparam="page" page-n="5"][/3d-flip-book]Code language: JSON / JSON with Comments (json)