I’m trying to access the aviplugins.com website (April 24, 2023 – 9 AM PT) to purchase the Pro version of the Custom Post Type Attachment plugin, but I’m seeing a Cloudflare “Invalid SSL certificate Error code 526” when trying to access the website.
]]>When I call the custom field cpt_pdf_attachment1 from another plugin to open the uploaded file it seems to leave out wp-content/uploads/ from the attachment url. Could anyone reading this help? Many thanks in advance.
]]>Hello, Nice and useful plugin!
I would like to change the file name with custom button i.e: “Download Tearsheet”. How to replace the filename text with other word or button please.
Thanks,
Agus
Hi,
the img html element of attachment file’s pdf for example
<img src="/wp-content/plugins/custom-post-type-pdf-attachment/images/pdf.png" style="z-index: 2147483646; position: relative;">
not contain “alt” attribute, requested by WCAG 2.0
I not be able to override your the shortcode , I developed this :
function custom_pdf_attachment_shortcode_child_theme( $atts ) {
global $post;
extract( shortcode_atts( array(
'file' => '',
'name' => ''
), $atts ) );
if(!$file){
return;
}
if(!cpta_get_file_url($post->ID,$file)){
return;
}
$pdf_open_in = get_option('pdf_open_in');
$target = ( $pdf_open_in == '' ? '_self' : $pdf_open_in );
if($name){
$ret = '<img src="'.plugins_url( CPTA_PLUGIN_DIR . '/images/pdf.png' ).'" alt="Download PDF '.$name.'" > <a href="'.cpta_get_file_url($post->ID,$file).'" target="'.$target.'">'.$name.'</a>';
} else {
$file_mime_data = wp_check_filetype(cpta_get_file_url($post->ID,$file));
$file_info = pathinfo(cpta_get_file_url($post->ID,$file));
$ret = '<img src="'.plugins_url( CPTA_PLUGIN_DIR . '/images/pdf.png' ).'" alt="Download PDF '.$file_info['basename'].'" > <a href="'.cpta_get_file_url($post->ID,$file).'" target="'.$target.'">'.$file_info['basename'].'</a>';
}
return $ret;
}
I think good is a good feature more, is it possible to add that ?
Thank you.
Beste regards.
After installing it doesn’t show up in post edit area…
]]>Hi
I’m using shortcodes to display attached PDFs in many posts. Everything is updated to the last versions.
While all was working fine, I can see that the URLs of all the attached files, in all posts, have changed from
https://www.mydomain.com/wp-content/uploads/xxxx/xx/filename.pdf as it was, and should be, to
https://www.mydomain.com/wp-content/uploadshttps://www.mydomain.com/wp-content/uploads/xxxx/xx/filename.pdf
This must have happened in the last month. Maybe with the last update of the plugin?
If I re-upload the files, the URL is corrected, same for new posts with uploads.
Any clue what can have provoked that, and mainly, is there a way to fix besides having to re-upload all the attachments ?? !
Thanks
Hi, in your functions.php file you must fix the cpta_get_file_url
function. You are sending a bad URL.
Please change line 14 from this:
return $upload_dir['baseurl'].$file_path;
to this:
return $file_path;
Kind regards.
]]>Hi, i use your plugin on several pages. But since the last update of the plugin (Version: 3.3.7) the WPBakery Page Builder (Version:6.0.2) doesn’t work any more.
Any idea, what i could do?
Kind regards,
Anna
]]>Hello dev, sorry for my english limitation.
I have a site that users can post into a CPT from front-end view. So While a user filling the form that I provide, user can also attach some PDF files from front-end view of my site.
So is there any way to display upload PDF button in the front-end of my site? Or is there any shortcode code that I can put in my front-end view of my site?
Thank you! This plugin is great btw
]]>After attached the pdf file and update or save the blog post and viewing it the pdf name has taken automatically -4 with file name.
for example:
filename-4
filename2-4
here “-4” take by default automatically.
please check out. and give solution
thank you.
I’m using the Pro version since it is a very useful and curated plugin. To help you maintain this high quality, i report you this little bug.
In the configuration page you can leave empty the field
“Enter Number of Attachment Files”
If you leave that field empty, you get errors in the post admin page and you can’t upload any file.
Please, since it seems to be not an option, provide a default number or accept “blank” for “infinite” number.
Hi, is it possible to count the number of downloads?
Stats for each Attachment? In Free or Pro version?
]]>when adding new post /wp-admin/post-new.php
]]>Notice: Undefined index: cpt_pdf_attachment_nonce in wp-content/plugins/custom-post-type-pdf-attachment/pdf_attachment.php on line 68
Hi,
Thanks for the great plugin.
I have uploaded 3 pdf files to single posts. I want to all three in one page. How can I get the count of uploaded files?
]]>Hi,
How to change Title of the Metabox?
Currently its showing like PDF Attachment 1,PDF Attachment 2.etc..
Is there have any option to change these titles into user identifying titles.
Thanks
I have put shortcode on newsletter page. But how to upload pdf file?
]]>Hi,
I want to remove the PDF icon form the front-end is it possible.
Dear Team,
Thank you very much for your great plugin!
Could you kindly help me to figure out how to:
1. open the attached pdf in a new tab, and
2. change the icon (/wp-content/plugins/custom-post-type-pdf-attachment/pdf.png) without accessing to the system files? (e.g., using custom css or revising php in the wp admin panel)
Thank you for your help in advance!
Best,
Garam
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Hi to all!
Is it possible to check if a user have uploaded a file, and shown the link to download only if file is loaded?
thanks.
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Hello,
i want to give every PDF i upload a special Name.
How can i make it?
i want to have next to the upload-field a text-field to enter some words – this words i want to display at my page..
can someone help me?
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Hi,
I used this plugin to upload a PDF technical sheets for a couple of my products. I have uploaded about 2000 products with a PDF file.
Now my site is really slow. I noticed that I have around 800 000 rows in the wp post_meta table and they are all PDF attachments.
Do you have any advice?
Thanks.
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Often when uploading a pdf the link will open and give the error: This PDF document might not be displayed correctly Open with different viewer. When I open with Adobe I receive an error: could not open because it is either not a supported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn’t correctly decoded).
If I copy the exact same file that I uploaded over the file that was uploaded in WP the link will work so I think there has to be some sort of problem with the upload mechanism.
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Even tho DEBUG is false, getting this on plain white page…
Notice: Undefined index: cpt_pdf_attachment_nonce1 in /nfs/c11/h01/mnt/200192/domains/farbest.com/html/wp-content/plugins/custom-post-type-pdf-attachment/pdf_attachment.php on line 67
Warning: Cannot modify header information – headers already sent by (output started at /nfs/c11/h01/mnt/200192/domains/farbest.com/html/wp-content/plugins/custom-post-type-pdf-attachment/pdf_attachment.php:67) in /nfs/c11/h01/mnt/200192/domains/farbest.com/html/wp-includes/pluggable.php on line 1196
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>I installed the plug in and activated it. I went into the settings and click on the boxes for post and pages and set the number to 10 and saved. I then went to the page I wanted to have the PDF files on and scrolled down to the area where I found the PDF Attachment boxes. I clicked on Choose File and selected the PDF file I wanted. Part of the file name appeared next to the Choose File Button.
What do I do next? I clicked to update the page and then got that error.
Thanks for any help
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Hi,
First, thanks for the great plugin, it’s really handy!
I’d like to list all the documents uploaded on a page on the frontend. Is there a way to do it?
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Since updating to version 2.1.4 of the plugin I’ve been getting the following error:
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\swarow\wp-content\plugins\custom-post-type-pdf-attachment\pdf_attachment.php on line 7
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>After activating the plugin following errors occure:
Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead…
and
Notice: Undefined index: option in /var/www/…/custom-post-type-pdf-attachment/settings.php on line 12
It seems that the current plugin version is not compatible with the current wordpress version. Will there be an update soon? Or could you please explain how to do a fix?
Regards
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Is there an option to make the attachments hidden to the public and to search engines?
I am looking for a plugin that lets me attachs PDFs but only make them visible for other authors who are logged in to the admin panel ??
Best regards,
SNURK
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Hi,
thanks for this plugin!
Is there a custom function code to show the upload form/box like in the edit post mode in custom posts front end view? Means so that I can put this code in the relevant php source.
Thanks!
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>Parse error: syntax error, unexpected T_STATIC in /../custom-post-type-pdf-attachement/settings.php on line 69
https://www.ads-software.com/plugins/custom-post-type-pdf-attachment/
]]>