Create a PDF viewer shortcode

If you’re using PDF files on your WordPress blog, it could be very cool to give your users the chance to open them using Google Docs. The following recipe will show you how you can do that.

The first step is to paste the following code into your functions.php file:

function pdflink($attr, $content) {
	return '<a href="http://docs.google.com/viewer?url=' . $attr['href'] . '">'.$content.'</a>';
}
add_shortcode('pdf', 'pdflink');

Once you saved the file, you’ll be able to use the shortcode on your posts and page. Here is the syntax:

[pdf href="http://yoursite.com/linktoyour/file.pdf"]View PDF[/pdf]

If you enjoyed this article, please consider sharing it!

12 Comments

  1. viagra pillen 9 years ago

    Awesome blog over here! Thanks for sharing this very usefull information. I will visit your blog again into a couple off days to check if you have some new articles.

  2. Stefah 9 years ago

    You can certainly see your expertise in the paintings you write. The world hopes for even more passionate writers such as you who are not afraid to say how they believe. Always go after your heart.

    • Marni 8 years ago

      This is ecxatly what I was looking for. Thanks for writing!

  3. Sivalia 9 years ago

    I like this usefull information, for that reason I wanna thank you for posting it and I’ll follow your blog even more when you’ll keep up the good work!

  4. Shreves 9 years ago

    Just wish to say your article is as amazing. The clarity on your publish is simply nice and that i can suppose you are a professional on this subject. Well together with your permission let me to snatch your RSS feed to keep updated with approaching post. Thank you a million and please carry on the gratifying work.

    • Lakesha 8 years ago

      I really wish there were more artciels like this on the web.

  5. viga 8 years ago

    good day I just read your article and I wanna thank you for the awesome information in it! Please keep up the good work guys!

    • Hawk 8 years ago

      At last! Someone who unedrstands! Thanks for posting!

  6. Micle 8 years ago

    Great website. A lot of useful information here. I am sending it to several pals ans also sharing in delicious. And of course, thanks on your effort!

  7. Dunsmoor 8 years ago

    Whats up very nice site!! Man .. Excellent .. Wonderful .. I’ll bookmark your blog and take the feeds also?I am happy to seek out numerous useful info here within the put up, we want develop more strategies in this regard, thanks for sharing. . . . . .

  8. Berna Kilger 8 years ago

    Have you ever thought about including somewhat bit extra than just your ideas? I imply, what you say is important and everything. However its obtained no punch, no pop! Maybe if you added a pic or two, a video? You could possibly have such a extra highly effective weblog for those who let people SEE what youre speaking about as a substitute of just studying it. Anyway, in my language, there usually are not much good supply like this.

  9. Isabella 8 years ago

    All of these artilces have saved me a lot of headaches.

  10. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Truly plenty of valuable advice!

    viagra overnight best price viagra online france
    viagra for sale uk
    professional viagra discussions b ogs – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  11. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You actually said that terrifically.

    cheep viagra uk viagra equivalent
    viagra online
    men over 50 viagra heart condition – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  12. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Truly plenty of good knowledge.

    differences between viagra and levitra viva viagra slogan
    cheap viagra
    when bush takes viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  13. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Nicely expressed truly. !

    how to order viagra online viagra and niacin
    generic viagra online
    online viagra drugs – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  14. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Cheers, I appreciate this.

    does female viagra work viagra 24 hour delivery
    viagra for sale uk
    viagra back pain side effect – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  15. AndrewJudge 9 months ago
    Your comment is awaiting moderation.
  16. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You have made your stand extremely effectively!.

    can viagra be outdated dosage viagra lower blood pressure
    buy viagra
    video viagra drunk – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  17. AndrewJudge 9 months ago
    Your comment is awaiting moderation.
  18. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Thanks. I like this!

    viagra cheap online rx pfizer stock quote before viagra
    generic viagra 100mg
    beyond viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  19. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Thanks, I value this!

    free viagra domain viagra how long it lasts
    generic viagra 100mg
    cheap prescription viagra – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  20. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You made your point pretty effectively!.

    viagra super viagra legitimate
    cheap viagra
    gifts ambien viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  21. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You stated this adequately.

    why is viagra brand better gnc viagra alternatives virility
    buy generic viagra
    viagra free viagra find charles linskaill – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  22. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Helpful posts. Regards.

    buy generic viagra si br apcalis cheaper levitra viagra
    viagra for women
    cuming on viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  23. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Nicely put. Regards.

    generic viagra compared glycine propionyl l carnitine and viagra
    buy viagra online
    viagra norco – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  24. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You reported that fantastically.

    viagra erectile disfunction penis viagra niagra bottled water
    generic viagra 100mg
    drug interactions between flomax and viagra – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  25. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Regards. Ample information!

    commercial viagra tri mix and viagra
    viagra for women
    medical research on viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  26. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Very good information. Regards!

    tga and viagra activated viagra
    viagra 100mg
    kamagra viagra sildenafil site ebaycouk – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  27. AndrewJudge 9 months ago
    Your comment is awaiting moderation.
  28. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You’ve made your point.

    how much viagra take treatment for amphetamine viagra combo
    viagra without a doctor prescription
    buy viagra in stockton ca – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  29. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You actually expressed that terrifically!

    viagra and unicure pharmacy viagra extacy ashanti
    buy generic viagra
    viagra sexual enhancement – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  30. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Amazing a lot of excellent material.

    viagra eye problems glaucoma viagra
    viagra 100mg
    viagra talking photo cube – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  31. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Fantastic stuff. Kudos!

    viagra online fedex a href buy viagra a
    generic viagra
    viagra substitute royal caribbean cruises – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  32. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Nicely put, Cheers!

    telemarketing and viagra daily viagra
    buy viagra online
    hydrochlorothiazide contradict viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  33. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You said this fantastically!

    easy buy viagra how often can use viagra
    generic viagra
    jaime randall viagra – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  34. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Nicely put, With thanks.

    thc female viagra viagra and coupon
    generic viagra 100mg
    directions for taking viagra 100mg – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  35. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Truly lots of terrific facts.

    viagra reversal online viagra no longer works
    buy viagra online
    christine rudakewycz theatrical viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  36. AndrewJudge 9 months ago
    Your comment is awaiting moderation.
  37. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Cheers! Wonderful information!

    viagra florida online pharmacy levitra compared to viagra
    viagra without a doctor prescription
    prostate ca and urinary incontinence viagra – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  38. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    This is nicely expressed! !

    viagra vs cialis minister viagra
    generic viagra
    lowest prices on generic viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  39. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You expressed that really well.

    generic sample pacs of viagra viagra require a prescription
    generic viagra online
    viagra in the news – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  40. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Useful postings. Thanks!

    where to buy viagra on line blood pressure viagra
    buy viagra online
    viagra free sites find computer shop – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  41. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Whoa plenty of valuable data!

    using viagra and cialis viagra site reviews
    buy viagra online
    buy viagra pills cheeer – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  42. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Truly many of beneficial info.

    best price generic viagra or cialis how long viagra works
    viagra without a doctor prescription
    viagra effects on a mans penis – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  43. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Kudos, Excellent stuff.

    penis size post viagra where can i buy cheap viagra
    viagra without a doctors prescription
    viagra tablet size – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  44. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Superb data. Cheers!

    instant viagra tabs does viagra give semen a flavor
    viagra for sale uk
    viagra without prescription canada – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  45. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Reliable information. With thanks.

    subaction showcomments viagra smiled newest is there a viagra alternative
    viagra without a doctor prescription
    cialis viagra cough sinus – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  46. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Regards! Valuable information!

    internet viagra purchase viagra cialis levitra
    viagra online
    discount site viagra – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  47. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Really a good deal of useful material.

    viagra sex viagra discounts
    viagra online
    discount viagra canada – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  48. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Terrific content. Thanks!

    viagra in the water viagra delivery
    cheap viagra
    viagra erection duration – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  49. AndrewJudge 9 months ago
    Your comment is awaiting moderation.
  50. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Great content. Thank you!

    viagra cost comparison virginia viagra and age related macular degeneration
    generic viagra online
    viagra ad on shawn hanedy – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  51. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Wow loads of terrific data.

    harm of expired viagra viagra effect on high blood pressure
    buy viagra
    subliminal viagra – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  52. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You said it superbly!

    viagra switzerland online most effective way to use viagra
    generic viagra online
    viagra ukraine – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  53. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Kudos, Numerous information!

    paypal to buy viagra instructions viagra
    buy viagra
    viva viagra wild horses – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  54. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You have made your point.

    viagra ceapest prices clonazepam and viagra
    generic viagra
    viagra and ecstacy and older men – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  55. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Helpful stuff. Kudos.

    viagra generic now football viagra
    viagra for women
    luxury hotel rome womens viagra – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  56. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Amazing posts. With thanks.

    does viagra prevent ejaculation japanese viagra with the red rocket
    buy generic viagra
    lowest price usa viagra – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  57. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Nicely put, Many thanks.

    side effects of teenren using viagra viagra is a trademark of who
    viagra pills
    download viagra – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  58. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Regards, Useful stuff!

    generic cialis and viagra what if viagra foes not work
    viagra without a doctor prescription
    interferes with viagra – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  59. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You’ve made your position very clearly.!

    viagra female men on viagra tubes
    viagra for sale uk
    viagra and oxycodone mixed – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  60. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Nicely put, Many thanks!

    taladafil versus viagra beta blockers and viagra
    buy viagra online
    beyond viagra – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  61. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Wonderful material. Thanks a lot.

    street value viagra 100mg viagra pro reviews
    generic viagra 100mg
    email viagra virus – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  62. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Thank you! Numerous data!

    green viagra group singing viva viagra video
    viagra for sale uk
    low priced viagra chain store – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  63. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    You said it adequately.!

    women who like men taking viagra functions that viagra helps
    viagra 100mg
    pfizer viagra generic – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  64. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Many thanks! I enjoy this.

    subaction showcomments viagra thanks posted viagra mexico ciudad del carmen
    viagra pills
    cheapest viagra in the world – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  65. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Kudos! Plenty of tips.

    viagra purchase uk herbs like viagra
    viagra for sale uk
    lowest viagra price – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  66. AndrewJudge 9 months ago
    Your comment is awaiting moderation.

    Truly a lot of helpful info.

    adult sites charles linskaill find viagra viagra im ausland kaufen
    viagra online
    viagra or 100mg – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  67. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    This is nicely said! .

    viagra procedures mother medical uses for viagra
    viagra for sale uk
    viagra lawsuit – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

  68. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    You actually said that wonderfully!

    25mg of viagra effects of viagra on females
    buy viagra
    injectable viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  69. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    Whoa loads of superb info.

    vitrectomy and viagra viagra cialis delivery
    viagra without a doctor prescription
    viagra side effects for reynauds – https://genericviagrarcp.com

    Davidmoirl
    Terencegen
    Victorlaw

  70. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    This is nicely expressed! !

    book buy online order viagra calis and viagra
    viagra 100mg
    12 generic meltabs viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  71. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    Incredible quite a lot of helpful tips!

    generic viagra picture of pfizer viagra
    buy generic viagra
    $99 viagra free consultations now – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  72. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    Cheers. A lot of data!

    viagra effects 0n pme viagra online without prescription overnight
    viagra online
    viagra sources – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  73. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    Wow a lot of wonderful knowledge.

    hard erections without viagra viagra suppositories ivf asherman’s
    buy viagra online
    which tesco are selling viagra – https://genericviagrantx.com

    Davidmoirl
    Terencegen
    Victorlaw

  74. AndrewJudge 8 months ago
    Your comment is awaiting moderation.
  75. AndrewJudge 8 months ago
    Your comment is awaiting moderation.

    Fantastic facts. Appreciate it.

    can i take cialis and viagra viagra order cheap iframe
    viagra pills
    viagra and cialis drugs – https://genericviagramsl.com

    Davidmoirl
    Terencegen
    Victorlaw

Leave a reply

Your email address will not be published. Required fields are marked *

*