Custom Post Type Attachment PRO
This plugin will allow you to upload document files to your posts, pages or any other custom post types that you have in your site. Attachments can be added to Comments as well. You can either use shortcodes or functions to display attachments. You can upload unlimited number of files as attachments. Restrict files to be downloaded by visitors of the site.
If you need support please Email us at [email protected]
All updates & support available for 1 year. Current Plugin (Version 4.3.6)
With Shortcode Support
Use this [pdf_attachment file="1"] shortcode to display uploaded document files in posts, pages or custom post types. file is (required)
Example: [pdf_attachment file="1" name="optional file name"]. Or else you can use this function in your template file. file is (required), name is (optional).
<?php echo pdf_attachment_file(1,"optional file name"); ?>. Here 1 is the document number, unlimited number of documents can be uploded to every single post.
Use [pdf_all_attachments] to display all Attachments with a single shortcode.
Shortcode Example: [pdf_all_attachments order="desc"] order can either be "asc" or "desc".
Display all Attachments added to a post/ page in your template using this single function <?php echo pdf_all_attachment_files(); ?>
Use This shortcode to embed document files in your post or page content [pdf_attachment_view file="1" width="400" height="500"]. file (required), width (optional), height (optional) Or else you can use this function in your template file.
<?php echo pdf_attachment_file_view(1); ?>
Setup and Usage
The setup of this plugin is very simple. In settings page you just have to select the post types where you want the file upload/ attachment functionality. A detailed explanation of how the plugin works and what can be done by this plugin are described below.
You have to select the post types where you want the document attachment options and the number of document files you want to upload per post. The selected post types will have boxes similer to the below image.
Number of files you want to upload for each post must be mentioned in the settings page. Suppose you have entered 5 documents in the number of documents field, then 5 boxes will appear in the post edit page. This is for the default number of attachments only. Attachments can be increased or decreased form the post edit page itself. The boxes have a number attached to them, this is the file number to be used with the shortcodes.
Example: [pdf_attachment file="2"]
Every file can be marked as Hidden. These files will be hidden from visitors of the site. Only Logged In users will be able to download these files. For others a message will be displayed in place of the hidden files. This message can be updated from admin panel.
You can select the user types that you want to give Permission to be able download the attachment files. Only selected user types will have permission to download the attachments.
Attachments can be enabled for WordPress Comments. Users can upload multiple files as attachments while posting a comment from frontend.
You have to select the post types where you want the comment attachment option. By default comment attachment is Diaabled on frontend.
Unlike the free version the file download link will be generated dynamically so that users will never see the actual location of the attachment file. This will make sure your files are Secured. Although if you want you can make the attachment open in a new tab.
The list of shortcodes that can be used with the plugin. This list is also available in the plugin settings page.
Files that can be uploaded are PDF, TXT, JPG, JPEG, BMP, GIF, PNG, DOC, DOCX, XLS, CSV, PPT, PPTX, ZIP
Not every file can be embedded, the supported files that can be embedded are Adobe Acrobat (PDF), Microsoft Word (DOC), Microsoft PowerPoint (PPT), Microsoft Excel (XLS) You can check the if the file can be embedded from here https://docs.google.com/viewerng/viewer?url=[PDF File URL]
License and AgreementPlease read the plugin license