Purpose: This shortcode displays a simple HTML sitemap of all published PDF Viewer posts. You can insert it into any page or post to list all your PDF Viewer entries in an unordered list, sorted alphabetically.
Example Usage:
When placed on a page, this will produce a linked list of every PDF Viewer custom post, allowing visitors to easily view and access all of your PDF documents.
2.
No PDF uploaded.
Purpose: This shortcode embeds a single PDF into your content. When used on a single PDF Viewer post, it automatically outputs the PDF for that post.
Basic Example:
No PDF uploaded.
When you insert this shortcode on a PDF Viewer post, it will dynamically use the current post’s data to embed the PDF.
Embedding a Specific PDF:
The shortcode supports specifying a particular PDF by providing its custom post ID as an attribute. For example:
No PDF uploaded.
3. Using
No PDF uploaded.
in Custom Template Files
Purpose: Whether you’re using a page builder (like Elementor, Divi, Beaver Builder, etc.) or you’ve created a custom template file for your PDF Viewer custom post type, you can insert the shortcode so it automatically displays the PDF of the current post.
Option A: Using a Shortcode or HTML Module in Your Page Builder
Most page builders offer a widget or module where you can insert custom shortcodes. Simply add a Text or Shortcode module and insert:
No PDF uploaded.
This will automatically output the embedded PDF on the PDF Viewer post.
Option B: Embedding the Shortcode in a Custom Template File
If you’re creating a custom template file (for example, in your theme or via a page builder’s custom code module), you can embed the shortcode using PHP. For example, in your custom template file for the PDF Viewer custom post type:
This PHP snippet dynamically outputs the embedded PDF for the current PDF Viewer post without the need for specifying an ID.
Both options allow you to integrate the shortcode seamlessly into your custom layouts.
That’s it! We hope this documentation helps you quickly set up and use our PDF Embed & SEO Optimize plugin. If you have any questions or run into issues, please refer to our support resources or contact us directly. Plugin developed by Dross:Media