How To Add Pdf To WordPress Post Using Media Uploader

Adding pdf to WordPress post is Our today’s topic and I will be sharing a straight forward trick on How you can add pdf to WordPress post using Media Uploader.

To add support pdf uploader button to WordPress post Add the following function in your theme’s funstions.php file just before the ?> symbol and you are done.adding pdf support to wordpress blog

  • Login to admin area.
  • Go to Appearance >>> Editor >>> Functions.php and add the below file before the ?> symbol and save.
function add_pdf_support( $post_mime_types ) {

	// select the mime type, here: 'application/pdf'
	// then we define an array with the label values

	$post_mime_types['application/pdf'] = array( __( 'PDFs' ), __( 'Manage PDFs' ), _n_noop( 'PDF (%s)', 'PDFs (%s)' ) );

	// then we return the $post_mime_types variable
	return $post_mime_types;

}

// Add Filter Hook
add_filter( 'post_mime_types', 'add_pdf_support' );

 

That is how to add pdf to WordPress post. Once you have added the above files into your Function php, you are good to go.

You can also read my post on how to turn blog post into pdf file.

I hope it works well for you too.
See you at the top :grin: .

Cheers!

Share Love!
About Azubuike Ikedionu

I have been working on my business since the early 2006. And I think I'm born with it :P. Well, I am Electrical Contractor, and have deep interest in sharing of new idea. I have basic knowledge in php & html. I love to blog & like Android gadgets. I travel a lot, but whenever I'm around I enjoy working on my blog and spending time with my family. I blog at silvaniblog.com. Connect with Azubuike on Google+, Facebook & Twitter.

Speak Your Mind

*

CommentLuv badge

You might also likeclose
Site PR Value Free PageRank Checker