How to disable WordPress PDF thumbnails

Since the version 4.7 of WordPress when uploading a PDF from the WordPress media loader generates a thumbnail of the first page of the same, for easy identification in the media library and the loader. [19659002] The problem that I find this new " feature " is that it is quite poor since it only serves to identify PDFs within WordPress, but does not include a thumbnail in the publications, like yes they do some plugins .

Also, will only work if your server is installed Imagick, ImageMagick and Ghostscript, total nothing so if these services are not installed and active you will have to request it from your hosting and is it worth it? I do not think so.

You just have to save the changes.

Filter PDF files in the file loader

By default, WordPress is able to identify 2 types of file in the file loader and multimedia library : images and videos.

In this way, when you upload a file of this type WordPress you can display a filter in the media loader so that you can identify them more quickly.

Now, if you use many PDF files you may be interested in having WordPress identify them and, also, allow you to filter files of this type and thus locate them more quickly to insert them in your content.

what you need just add this code to your function plugin or to the file functions.php of your active topic:

You save the changes and you already have them. If you want to add another type of file you can do the same with the mimes registered in the file ' /wp-includes/functions.php ', looking for the string ' get_allowed_mime_types ( ) ', where you'll find something like this:

You choose from the list the type of mime to add and add it as in the array of the above code.

What we get is to move on from this …

… to this other:

NOTICE : this publication is from two years ago or more. If it's a code or a plugin it might not work in the latest versions of WordPress, and if it's a news story it might be obsolete. Then do not say we have not warned you.

Loading …

That may also help you:

Embed documents with download link in WordPress

Hello everyone, I searched for the form of embed pdf or power point documents and that the last thing I have not yet achieved, because I'm still developing the function, I wanted to show you how to embed a pdf document in our article by shortcode staying on the server, in Google Docs or wherever …

Already in a previous article we were shown how to make a link for preview of a pdf but I wanted to embed that preview and also generate its respective link to disarm it so I started to investigate and I created a shortcode that allows doing that:

/ * PREVIEW OF DOCUMENTS * /

function docslink ( $ attr $ content ) {

return '<iframe src = "https://docs.google .com / gview? url = ' . $ attr [' href '] [19659009]. '& embedded = true "style =" width: 580px; height: 500px; " frameborder = "0">

<span class = "removed_link" title = "'. $ attr [' href '] . '">' . $ content . '

' ;

}

add_shortcode ( 'docs' 'docslink' ) ;

What the shortcode does is generate the preview of the document hosted either on our server or on an external one, and generate the respective download link; is used in this way:

I hope you have served them, I tried it and it works great and without installing any plugin … Thank you very much …

PDF viewer using shortcode

If you want to take advantage of the Google Docs viewer, and upload your own PDF hosted on your server, without having to upload them to Google Docs you can do it by creating a shortcode that uses this functionality.

1. Add this code to the file functions.php of your active topic:

2. Use the shortcode just created to upload your pdfs in this way:

WordPress Guide for beginners • WordPress Help

We use third party cookies with services, also guarantors of your privacy, that analyze your browsing uses so that we can improve the contents, if you are already subscribed to the newsletter and the shared elements in social networks and the comments form. [19659002] 1P_JAR, APISID, CONSENT, HPSID, NID, SAPISID, SID, SIDCC, SSID, disqus_unique, disqusauth

disqus_unique, disqusauth

1P_JAR, APISID, CONSENT, HPSID, NID, SAPISID, SID, SIDCC, SSID

]