wordpress代码块_如何在WordPress的特定帖子中显示广告块

wordpress代码块

Do you want to display ad blocks within specific WordPress posts? This ad placement allows you to show ads when your users are highly engaged with the content. In this article, we will show you how to easily display ad blocks in specific WordPress posts without writing any code or breaking your site.

您是否要在特定的WordPress帖子中显示广告块? 通过此广告展示位置,您可以在用户高度关注内容的情况下展示广告。 在本文中,我们将向您展示如何轻松地在特定的WordPress帖子中显示广告块,而无需编写任何代码或破坏您的网站。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

为什么在特定的WordPress帖子中显示广告? (Why Display Ads in Specific WordPress Posts?)

While there are many ways to make money blogging, banner ads top the list. Often you see banner ads in the sidebar or on the header of the website. Since those are very common ad spots, it leads to banner blindness which affects the click rate, and your site’s revenue.

尽管有很多方法可以使博客赚钱 ,但横幅广告却是最重要的。 通常,您会在侧边栏或网站标题上看到横幅广告。 由于这些是非常常见的广告位,因此会导致横幅广告失明,从而影响点击率和您网站的收入。

To deal with this issue, many publishers insert ads within post content. It works because this is the point when your users are most engaged with the content. This increases ad visibility and helps you get more clicks.

为了解决此问题,许多发布者在帖子内容中插入广告 。 之所以起作用,是因为这是您的用户最关注内容的时候。 这样可以提高广告的展示率,并帮助您获得更多点击。

However, you also need to consider user experience. Placing too many ads inside your posts can be obtrusive and annoying.

但是,您还需要考虑用户体验。 在您的帖子中放置太多广告可能会令人讨厌且令人讨厌。

To reduce the adverse effects, you can selectively display ad blocks in specific WordPress posts on your site. These posts can be your most popular posts, long form articles, or featured content.

为了减少不利影响,您可以有选择地在网站上特定WordPress帖子中显示广告块。 这些帖子可以是您最受欢迎的帖子长篇文章特色内容

Having said that, let’s see how to easily display ads in specific WordPress posts.

话虽如此,让我们看看如何轻松地在特定的WordPress帖子中显示广告。

在特定的WordPress帖子中显示广告 (Displaying Ads in Specific WordPress Posts)

First thing you need to do is install and activate the Adsanity plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并**Adsanity插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

Adsanity is a premium WordPress ad management plugin. It allows you to easily create ad blocks and display them anywhere on your WordPress site. It works with any third-party ad network, including Google Adsense. You can also use it to sell ads directly to advertisers.

Adsanity是高级WordPress广告管理插件 。 它使您可以轻松创建广告块,并将其显示在WordPress网站上的任何位置。 它可与包括Google Adsense在内的任何第三方广告网络一起使用。 您还可以使用它直接向广告商出售广告。

For more information, see our guide on how to manage ads in WordPress with Adsanity plugin.

有关更多信息,请参阅有关如何使用Adsanity插件在WordPress中管理广告的指南。

After activating the plugin, you need to visit Adsanity » Create Ad page to create your first ad.

**插件后,您需要访问Adsanity»创建广告页面来创建您的第一个广告。

First you need to enter a title for your ad. This will help you identify ads on your site.

首先,您需要输入广告标题。 这将帮助您识别网站上的广告。

Next, you need to choose what kind of ad you want to create. Adsanity allows you to add hosted ads and third party ads.

接下来,您需要选择要制作的广告类型。 Adsanity允许您添加托管广告和第三方广告。

For hosted ads, you need to select the ad size. After that you can enter a tracking URL and provide an image you want to use for the ad.

对于托管广告,您需要选择广告尺寸。 之后,您可以输入跟踪URL并提供要用于广告的图像。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

For third-party ad networks like Google Adsense, you need to switch to ‘External Ad Network’ tab. Here you can select the ad size and paste the ad code provided by the ad network.

对于Google Adsense等第三方广告网络,您需要切换到“外部广告网络”标签。 在这里,您可以选择广告尺寸并粘贴广告网络提供的广告代码。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

Next, you can publish your ad or click on the edit link and set an schedule for the ad. You’ll be able to set a start date and an expiration date for this particular ad.

接下来,您可以发布广告或点击修改链接,并设置广告投放时间。 您可以为该特定广告设置开始日期和到期日期。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

After you have published the ad, you can add it into your WordPress posts and pages, or anywhere else on your website that you desire.

发布广告后,您可以将其添加到WordPress 帖子和页面中 ,或添加到网站上您想要的其他任何位置。

在WordPress帖子中插入广告块 (Inserting Ad Blocks in a WordPress Post)

First you need to edit the post or page where you want to display your ad block. You will notice ‘Insert Ad’ and ‘Insert Ad Group’ buttons in the visual editor. You need to click on the insert ad button.

首先,您需要编辑要在其中显示广告块的帖子或页面。 您会在视觉编辑器中注意到“插入广告”和“插入广告组”按钮。 您需要点击插入广告按钮。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

This will bring up a popup where you can select the ad you want to display and click on the Insert link.

这将弹出一个弹出窗口,您可以在其中选择要显示的广告,然后单击“插入”链接。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

The plugin will insert the ad shortcode inside your post. You can now save and view your post to see the ad in action.

该插件会将广告简码插入您的帖子中。 现在,您可以保存并查看您的信息,以查看正在运行的广告。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

Adding Ad Block in WordPress Post Using Shortcode

使用简码在WordPress帖子中添加广告块

You can also add the ad block to a WordPres post using shortcode. This is particularly helpful if you use the text editor to write your posts.

您还可以使用shortcode将广告块添加到WordPres帖子 。 如果您使用文本编辑器来撰写帖子,这将特别有用。

Head over to Adsanity » Manage Ads page. You’ll see the list of ads you have created.

转到Adsanity»管理广告页面。 您会看到已创建的广告列表。

Next to each ad, you will see a shortcode link. Clicking on it will automatically copy the shortcode to your clipboard.

在每个广告旁边,您会看到一个简码链接。 单击它会自动将短代码复制到剪贴板。

wordpress代码块_如何在WordPress的特定帖子中显示广告块

Go on and edit the post or page where you want to display the ad and paste the shortcode. Don’t forget to update post to save your changes.

继续并编辑您要在其中展示广告的帖子或页面,然后粘贴简码。 不要忘记更新帖子以保存您的更改。

We hope this article helped you learn how to easily display ad blocks in specific WordPress posts. You may also want to see our list of the best affiliate marketing tools and plugins for WordPress.

我们希望本文能帮助您学习如何轻松地在特定的WordPress帖子中显示广告块。 您可能还希望查看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/wp-tutorials/how-to-display-ad-blocks-in-specific-posts-in-wordpress/

wordpress代码块