如何在WordPress中显示插件和主题信息

You’ve probably seen iOS app card display on tech sites. Recently one of our readers asked if it was possible to display WordPress plugins and theme information detail cards. In this article, we will show you how to easily display plugin and theme information on your WordPress site in beautiful info cards that include rating, download count, last update date, icons, and more.

您可能已经在技术网站上看到了iOS应用卡的显示。 最近,我们的一位读者询问是否可以显示WordPress插件和主题信息详细信息卡。 在本文中,我们将向您展示如何在精美的信息卡中轻松地在WordPress网站上显示插件和主题信息,其中包括评分,下载次数,最后更新日期,图标等。

Preview of plugin and theme info cards in WordPress

First thing you need to do is install and activate the WP Plugin Info Card plugin. Upon activation, simply create a new post or edit an existing one.

您需要做的第一件事是安装并激活WP Plugin Info Card插件。 激活后,只需创建一个新帖子或编辑现有帖子即可。

On the post editor screen, you will notice a new plugin info card button.

在帖子编辑器屏幕上,您会注意到一个新的插件信息卡按钮。

Button to insert plugin and theme info card in your posts or pages

Clicking on it will bring up the plugin’s shortcode generator popup.

单击它会弹出插件的简码生成器弹出窗口。

Shortcode generator

You will need to choose whether you want to fetch the information for a plugin or a theme. This plugin can only display information for plugins and themes that are hosted on the official WordPress.org site.

您将需要选择是要获取有关插件还是主题的信息。 此插件只能显示官方WordPress.org网站上托管的插件和主题的信息。

Next, you need to enter the plugin or theme’s URL slug.

接下来,您需要输入插件或主题的URL slug

You can get the URL slug by visiting the theme or plugin’s page on the WordPress directory.

您可以通过访问WordPress目录中的主题或插件页面来获取URL插件。

Finding plugin and theme slug in URL

Among other options, you can choose plugin’s color scheme, info card alignment, custom image url, etc. Once you are satisfied with the settings, simply click on the OK button. This will insert the info card shortcode into your post editor.

在其他选项中,您可以选择插件的配色方案,信息卡对齐方式,自定义图像url等。对设置满意后,只需单击“确定”按钮。 这会将信息卡短代码插入您的帖子编辑器。

You can now preview your post in a web browser to see the info card in action.

现在,您可以在网络浏览器中预览帖子,以查看正在使用的信息卡。

手动添加插件信息卡简码 (Manually Adding The Plugin Info Card Shortcode)

Some users would find it easier to manually add shortcode on their own. Here is the basic shortcode:

一些用户会发现,自己手动添加简码会更容易。 这是基本的简码:

[wp-pic slug="floating-social-bar"]

[wp-pic slug="floating-social-bar"]

[wp-pic type="theme" slug="slipstream"]

[wp-pic type="theme" slug="slipstream"]

For the full list of shortcode parameters please see the plugins page.

有关简码参数的完整列表,请参见插件页面。

We hope this article helped you display plugin and theme information on your WordPress site in beautiful info boxes. You may also want to check out our expert pick of 20 must have WordPress plugins for 2015.

我们希望本文能帮助您在漂亮的信息框中显示WordPress网站上的插件和主题信息。 您可能还需要查看我们的专家精选,其中20个必须包含2015年的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 Google+.

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

翻译自: https://www.wpbeginner.com/plugins/how-to-display-plugin-and-theme-information-in-wordpress/

Smart Ads自定义显示博客广告,可以根据文章的长度、发布时间早晚、分类,甚至文章作者来设置不同的广告。可以使用 [smartads]快捷方式来在文章或者页面调用自定义广告——广告代码直接在插件选项里面设置。如果你使用的是wp2.7版本,删除插件后,插件会自动从Mysql数据库删除相应的设定。 Smart Ads插件安装: 1.下载Smart Ads插件,然后上传插件到/wp-content/plugins/下的文件夹。 2.到WordPress 管理后台插件页面激活插件,激活后插件后,点击“Setting”--->“Smart Ads”进行相关设置,页面如下(点击浏览全图): 页面有如下选项: Smart Ads选项设定:Show Custom ads on Homepage? 是否在首页显示自定义广告。 选定之后,首页也会出现广告,否则的话就只是出现在内容页。注意:google adsense单个页面仅允许显示三个广告单元,需注意这一点。 Minimum Post Wordcount:设定显示广告的最短字数 如果内容过少的话,展示出来的广告会很不美观。设定后,除非文章字数超过你设定的数字,否则广告不会出现。 Only show ads on posts older then :文章超过多少天后才显示广告 这个应该主要是考虑到订阅用户和老用户。对于博客而言,新文章看的最多的人还是订阅者或者是老用户。 Category Exclusions:排除不显示广告的分类 把分类的ID——不是分类名称——填入,用半角状态下的逗号隔开。在这些分类下的文章将不会显示广告——自定义广告出外。 Disable Top Ad if Post Begins with an Image:如果文章以图片开头,或者在图片之前的字数不够,则顶部广告不显示。 Disable Ads For Registered Members对注册用户不显示广告 如果这个选项勾选的话,博客注册用户登陆浏览的时候将看不到任何广告,包括自定义广告。 介绍完上面的选项后,下面我们就要把广告代码放到“Advertising Code”,Advertising Code有三部分: •Top AD:广告将显示在文章内容的顶部 •Bottom AD:广告将显示在文章内容的底部 •Custom AD:自定义广告,使用[smartads]调用广告 放入广告代码后,点击Update就OK了。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值