wordpress表格筛选_如何在WordPress博客文章中嵌入PDF,电子表格等

wordpress表格筛选

Do you want to embed PDF, spreadsheet, and other types of documents in your WordPress blog posts?

您是否要在WordPress博客文章中嵌入PDF,电子表格和其他类型的文档?

WordPress comes with a powerful content editor and allows you to easily embed videos, tweets, audio, and other media formats using the embed blocks.

WordPress带有功能强大的内容编辑器,可让您使用嵌入块轻松嵌入视频tweet ,音频和其他媒体格式。

You can also upload other type of files that users can download. However, it is not possible to embed files like PDF, spreadsheet, and other documents in your blog posts.

您还可以上传用户可以下载的其他类型的文件。 但是,无法在博客文章中嵌入PDF,电子表格和其他文档之类的文件。

In this article, we’ll show you how to embed PDF, spreadsheet, powerpoint, and other documents in your WordPress blog posts.

在本文中,我们将向您展示如何在您的WordPress博客文章中嵌入PDF,电子表格,PowerPoint和其他文档。

Embedding PDF, Spreadsheet and Others in WordPress Blog Posts

To help you navigate this guide, we have created the table of contents here.

为了帮助您浏览本指南,我们在此处创建了目录。

  1. Adding PDF in WordPress Blog Posts without Plugin在没有插件的WordPress博客文章中添加PDF
  2. Embedding PDF in WordPress Posts Using the PDF Viewer Plugin使用PDF Viewer插件将PDF嵌入WordPress帖子中
  3. Embedding Spreadsheets, and Other Types of Documents in WordPress在WordPress中嵌入电子表格和其他类型的文档
  4. How to Embed SlideShare Presentations in WordPress Posts如何在WordPress帖子中嵌入SlideShare演示文稿
  5. Embedding Google Docs, Sheets, and Others in WordPress Posts在WordPress帖子中嵌入Google文档,表格和其他文档

Now, let’s get started with the guide.

现在,让我们开始使用该指南。

在没有插件的WordPress博客文章中添加PDF (Adding PDF in WordPress Blog Posts without Plugin)

By default, WordPress doesn’t offer full embed option for PDF documents; however, you can add them as links in your blog posts.

默认情况下,WordPress不提供PDF文档的完整嵌入选项; 但是,您可以将它们添加为博客文章中的链接。

This option is useful if you don’t want to add a plugin to your website.

如果您不想在网站上添加插件,则此选项很有用。

Simply add the File block to your WordPress post or page and then upload your PDF file.

只需将File块添加到WordPress帖子或页面,然后上传PDF文件。

Add file block

Once you have uploaded the PDF file, WordPress will display the file name with a download button. You can edit the file name and download button text.

一旦您上传了PDF文件,WordPress将显示带有下载按钮的文件名。 您可以编辑文件名和下载按钮文本。

Download PDF link

You also have the option to show or hide the download button and choose whether it links to the file itself or the attachment page.

您还可以选择显示或隐藏下载按钮,然后选择是链接到文件本身还是附件页面。

You can use this method to upload Microsoft Word documents, Excel spreadsheets, and PowerPoint presentations to your website.

您可以使用此方法将Microsoft Word文档,Excel电子表格和PowerPoint演示文稿上载到您的网站。

While this method is easier and straight-forward, it does not embed the documents which means users have to download the file to view it, and this may not be very user friendly depending on the use-case.

尽管此方法更加简单明了,但它不会嵌入文档,这意味着用户必须下载文件才能查看它,并且根据使用情况,这可能不是非常用户友好。

Let’s take a look at some other ways to embed documents in WordPress.

让我们看一下将文档嵌入WordPress的其他方法。

使用Embed PDF Viewer插件将PDF嵌入WordPress帖子中 (Embedding PDF in WordPress Posts Using Embed PDF Viewer Plugin)

As shown above, displaying the PDF files as links will lead your website visitors away from your site.

如上所示,将PDF文件显示为链接将使您的网站访问者远离您的网站。

In this method, we will cover how to easily embed the document in your WordPress posts and pages.

通过这种方法,我们将介绍如何轻松地将文档嵌入WordPress帖子和页面。

First, you need to install and activate the Embed PDF Viewer plugin. For detailed instructions, see our step by step guide on how to install a WordPress plugin.

首先,您需要安装并激活Embed PDF Viewer插件 。 有关详细说明,请参阅有关如何安装WordPress插件的分步指南。

Once the plugin is activated, simply create a new post or edit an existing one to embed a PDF document.

激活插件后,只需创建一个新帖子或编辑现有帖子即可嵌入PDF文档。

In the WordPress post edit screen, click on the Add New Block icon, and select the PDF block under Embeds section.

在WordPress帖子编辑屏幕中,单击“添加新块”图标,然后在“嵌入”部分下选择PDF块。

Choose PDF Embed Block in WordPress Post Editor

After that, you can upload a new PDF file to your post, select one from your media library or insert from URL.

之后,您可以将新的PDF文件上传到帖子中,从媒体库中选择一个,或从URL中插入。

PDF Block Added in WordPress Editor

Once you select the file, you can see the PDF file embedded in your blog post. You can also resize the embed area and add additional CSS from the block options on the left side.

选择文件后,您可以看到博客文章中嵌入的PDF文件。 您还可以调整嵌入区域的大小,并从左侧的块选项中添加其他CSS。

PDF Embedded in WordPress Post Editor

Once you’re done with customization, simply save your post and preview it on your live website. Here’s how it appeared on our demo website.

完成自定义设置后,只需保存您的帖子并在实时网站上预览即可。 这是它在我们的演示网站上的显示方式。

PDF Embedded in WordPress Post Preview
在WordPress中嵌入Microsoft Word,电子表格和其他文档 (Embedding Microsoft Word, Spreadsheet, and Other Documents in WordPress)

The plugin mentioned above only lets you embed PDF files into your WordPress site.

上面提到的插件仅允许您将PDF文件嵌入到WordPress网站中。

If you want to embed more document types like Microsoft Word, Excel spreadsheet, PowerPoint presentation, etc, then you need to use another plugin.

如果要嵌入更多文档类型,例如Microsoft Word,Excel电子表格,PowerPoint演示文稿等,则需要使用另一个插件。

First, you need to install and activate the Embed Any Document plugin on your website.

首先,您需要在网站上安装并激活“ 嵌入任何文档”插件。

Next, create a new post or open an existing one to embed a document. Once done, add the Document block under the Embeds section.

接下来,创建一个新帖子或打开一个现有的帖子以嵌入文档。 完成后,在“嵌入”部分下添加“文档”块。

Add Document Block in WordPress Editor

After that, you need to click on the Add Document button.

之后,您需要单击添加文档按钮。

Add Document Option in WordPress Post Editor

Next, you can upload a document or add from a URL. The paid plugin users can also attach documents from Google Drive, Dropbox, and Box.

接下来,您可以上传文档或从URL添加。 付费插件用户还可以附加来自Google云端硬盘,Dropbox和Box的文档。

Add Document Options

Once you choose the document to embed, you will see the options to customize the embed. You need to review them and click the Insert button.

选择要嵌入的文档后,您将看到自定义嵌入的选项。 您需要检查它们,然后单击“插入”按钮。

Add Spreadsheet Advanced Options

Once done, you can see the document embedded in your post. You can also review the document display options again from the block options panel on the left side.

完成后,您可以看到帖子中嵌入的文档。 您也可以从左侧的块选项面板再次查看文档显示选项。

Spreadsheet Embedded in WordPress Editor

Save your post and preview it on your live website. Here’s how the embedded spreadsheet looked on our demo website.

保存您的帖子并在您的实时网站上预览。 这是嵌入式电子表格在我们的演示网站上的外观。

Spreadsheet Embedded in WordPress Preview
将SlideShare演示文稿嵌入WordPress帖子中 (Embedding SlideShare Presentations in WordPress Posts)

Unlike PDF and other documents, WordPress allows you to easily embed content from third-party services into your website.

与PDF和其他文档不同,WordPress使您可以轻松地将第三方服务中的内容嵌入到您的网站中。

It has built-in embed options for YouTube videos, Tweets, Facebook updates, SlideShare presentations, and many more.

它具有用于YouTube视频推文 ,Facebook更新,SlideShare演示文稿等的内置嵌入选项。

Best of all, the new WordPress block editor includes separate embed blocks for them.

最重要的是,新的WordPress块编辑器为它们提供了单独的嵌入块。

To embed a SlideShare presentation in your WordPress blog post, create a new post, or edit an existing one. Next, click on the Add New Block icon and add the SlideShare block in your post edit area.

要将SlideShare演示文稿嵌入到WordPress博客文章中,请创建一个新文章或编辑现有文章。 接下来,单击添加新块图标,然后在您的帖子编辑区域中添加SlideShare块。

Add SlideShare Embed Block in WordPress Post Editor

Next, you need to visit the SlideShare website and copy the link of a SlideShare presentation that you want to embed.

接下来,您需要访问SlideShare网站并复制要嵌入的SlideShare演示文稿的链接。

Once done, paste the link in the embed SlideShare block and click on the Embed button.

完成后,将链接粘贴到嵌入SlideShare块中,然后单击“嵌入”按钮。

Embed SlideShare URL in WordPress Post

After that, you can see the SlideShare presentation embedded in your blog post. You can review the block options on the left side, and save your post.

之后,您可以看到嵌入在博客文章中的SlideShare演示文稿。 您可以查看左侧的屏蔽选项,然后保存您的帖子。

SlideShare Presentation Added in WordPress Editor

Once done, you can preview the embedded SlideShare presentation live on your website. Here’s how it looked on our demo website.

完成后,您可以在网站上实时预览嵌入式SlideShare演示文稿。 这是在我们的演示网站上的外观。

SlideShare Presentation Added in WordPress - Preview
如何在WordPress中嵌入Google文档,表格和其他文档 (How to Embed Google Docs, Sheets, and Others in WordPress)

In the above examples, we have covered how to add PDF and other documents from your local computer. However many users nowadays use Google Drive to create and store documents (specially small business owners).

在以上示例中,我们介绍了如何从本地计算机添加PDF和其他文档。 但是,如今许多用户都使用Google云端硬盘创建和存储文档(特别是小型企业主)。

Similar to Microsoft Word, Excel Sheets, and PowerPoint presentations, Google Drive also lets you create Docs, Sheets, Presentations, and other online documents.

与Microsoft Word,Excel表格和PowerPoint演示文稿类似,Google云端硬盘还可以让您创建文档,表格,演示文稿和其他在线文档。

If you have created documents in Google Drive, then you can easily embed these files in your WordPress posts by using the iFrame method.

如果您已经在Google云端硬盘中创建了文档,则可以使用iFrame方法轻松地将这些文件嵌入WordPress帖子中。

To embed a Google doc in WordPress, you need to open the document in your browser first. After that, go to the File menu and click on the “Publish to the web” option.

要将Google文档嵌入WordPress中,您需要先在浏览器中打开该文档。 之后,转到“文件”菜单,然后单击“发布到网络”选项。

Publish to the Web Option in Google Doc

After that, a new popup window will appear. You need to select the Embed option and then click on the Publish button.

之后,将出现一个新的弹出窗口。 您需要选择“嵌入”选项,然后单击“发布”按钮。

Click Publish to Find the Embed Code for Google Doc

Once done, it will provide you an iFrame embed code. Go ahead and copy the code.

完成后,它将为您提供一个iFrame嵌入代码。 继续并复制代码。

Embed a Google Doc Code

Next, you need to create a new post or edit an existing one to embed the Google doc. In your post editor, add the Custom HTML block to insert the embed code.

接下来,您需要创建一个新帖子或编辑现有帖子以嵌入Google文档。 在您的帖子编辑器中,添加“自定义HTML”块以插入嵌入代码。

Add Custom HTML Block in WordPress Post

Once the Custom HTML block is added in your post edit area, paste the embed code that you copied before.

将自定义HTML块添加到帖子编辑区域后,粘贴之前复制的嵌入代码。

Google Doc Embed Code Added in WordPress Post

You may need to add height and width parameters to the embed code. Simply add the parameters to the iframe code like this:

您可能需要在嵌入代码中添加height和width参数。 只需将参数添加到iframe代码中,如下所示:


<iframe src="https://docs.google.com/document/d/e/2PACX-1vQXyRM7bAOY2Em38yYkFKDlFwMp7tlofsdfdgeGDFg4lVkv_9HB_5WbGLwfMScaGQmDf34mIH/pub?embedded=true" width="550" height="600"></iframe>

After that, you can save your post and then preview it on your live website. Here is how it appeared on our demo website.

之后,您可以保存您的帖子,然后在您的实时网站上预览。 这是它在我们的演示网站上的显示方式。

Google Doc Embedded in WordPress Post -preview

You can now use this method to embed other documents from your Google Drive account to WordPress.

现在,您可以使用此方法将其他文档从您的Google云端硬盘帐户嵌入WordPress。

We hope this article helped you to learn how to embed PDF, spreadsheet, and other documents in WordPress posts. You may also want to see our guide on how to manage, track, and control file downloads in WordPress.

我们希望本文能帮助您学习如何在WordPress帖子中嵌入PDF,电子表格和其他文档。 您可能还希望查看有关如何在WordPress中管理,跟踪和控制文件下载的指南

If you want to restrict files and content to logged in users only, then you need to use a WordPress membership plugin to create a membership website.

如果您想将文件和内容限制为仅登录用户,则需要使用WordPress会员插件来创建会员网站。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-embed-pdf-spreadsheet-and-others-in-wordpress-blog-posts/

wordpress表格筛选

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值