[wordpress插件] AMP Recent PostsAMP最近帖子

wordpress 插件 文章 2020-02-17 21:20 465 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Adds recent posts to your AMP content.

将最新帖子添加到您的AMP内容中。

Extends the AMP plugin (Automattic) via options page, works alongside all other AMP plugins by use of shortcode added to the plugins template.

通过选项页面扩展AMP插件(自动),并通过使用添加到插件模板的简码与所有其他AMP插件一起使用。

Shortcode allows to customize the endpoint of the links (to fit the AMP plugin you are using), add a title, and set a limit to the total amount of links.

简码允许自定义链接的端点(以适合您使用的AMP插件),添加标题并为链接的总数设置限制。

NEW IN 2.0

2.0的新功能

If you make use of the popular AMP plugin by Automattic you can now use of the new options page!

如果您使用Automattic受欢迎的AMP插件,现在可以使用新的选项页面!

The plugin uses the AMP footer hook to add Recent Posts to your AMP content and comes with a series of new functions:

该插件使用AMP页脚挂钩将“最新帖子”添加到AMP内容中,并具有一系列新功能:

    • Post type support: return posts, pages or any other including custom post type

      帖子类型支持:返回帖子,页面或其他任何类型,包括自定义帖子类型

    • Display featured images

      显示特色图片

    • Display the date

      显示日期

    • Exclude posts by ID

      按ID排除帖子

    • Change the priority of the hook

      更改挂钩的优先级

    As well the default options of setting a custom endpoint, heading and max number of posts.

    还有设置自定义端点,标题和最大帖子数的默认选项。

    With the 2.0 update we completely rewritten the plugin (better queries, better compatibility, bug fixes) with you in mind.

    在2.0更新中,我们完全记住了插件(更好的查询,更好的兼容性,错误修复)。

    Although we’ve tested
      

    尽管我们已经测试过
      

    extensively something might have slipped through, kindly let us know if you find any<

    如果发现有什么请让我们知道

    br />  

    br />  

    inconsistencies, thank you!

    不一致,谢谢!

    This plugin is actively maintained but will not be supported.

    该插件正在积极维护,但不受支持。

    I will however try to answer any questions in the comment section of the plugin website

    不过,我将尝试在插件网站的评论部分中回答任何问题。

    and create a FAQ here in the repository.

    并在存储库中创建一个常见问题解答。

安装步骤

Using the AMP plugin by Automattic

使用Automattic的AMP插件

    1. Upload and activate plugin
    2. 上传并激活插件

    3. Visit the plugin options page and set your preferences
    4. 访问插件选项页面并设置您的首选项

    Using shortcode

    使用简码

      1. Upload and activate plugin
      2. 上传并激活插件

      3. Place this code in your AMP template:
      4. 将此代码放在AMP模板中:

      <?php echo do_shortcode(“ [amp-recent-posts]”);

      ?>

      ?>

      Shortcode: Customizing the display of the AMP Recent Posts plugin:

      简短代码:自定义AMP最新帖子插件的显示:

        • append=’amp’ change the endpoint to suit your own.

        • append ='amp'更改端点以适合您自己的端点。

          Depending on which AMP plugin you are using you can adjust the slug to direct to the AMP articles, standard: ‘amp’ (appropriate for the AMP plugin by Automattic).

        • 根据使用的AMP插件,您可以调整弹头以定向到AMP文章,标准为:“ amp”(适用于Automattic的AMP插件)。

        Example: append=’amp-post’ will generate a slug ‘yourwebsite.nl/post/amp-post/’

        示例: append =” amp-post” 将生成一个“ yourwebsite.nl/post/amp-post /”

          • heading=’Recent Posts’ will add an H3 heading, standard: none

            heading =“近期帖子” 将添加H3标题,标准:无

          • max=’5′ will set a limit to the amount of posts displayed:, standard: 10

            max ='5'将对显示的帖子数设置限制:标准:10

          • The code can now look like this:

            代码现在可以如下所示:

          <?php echo do_shortcode(“ [amp-recent-posts append ='amp'heading ='Recent Posts'max ='5']”);

          ?>

          ?>

          Depreciated and backwards compatibility

          折旧和向后兼容

          If you are using the AMP plugin by Automattic you might have used a custom hook to implement the code in your theme’s functions.php file.

          如果您使用的是Automattic的AMP插件,则可能使用了自定义钩子来实现主题的functions.php文件中的代码。

          Since the 2.0 update this can now be handled by the plugin setting on the options page.

          从2.0版开始,现在可以通过选项页面上的插件设置来处理此问题。

          If you wish to keep using the hook please update it like so:

          如果您希望继续使用钩子,请像这样更新它:

          //* Add content to the AMP template footer (AMP plugin Automattic)

            // **将内容添加到AMP模板页脚(AMP插件Automattic)

          //* Place in your theme's functions.php

          // *放在主题的functions.php中

          function add_rec_to_amp_footer() {

          函数add_rec_to_amp_footer(){

          if ( function_exists('is_amp_endpoint') )

          如果(function_exists('is_amp_endpoint'))

          ?>

          ?>

          <?php echo do_shortcode(“ [amp-recent-postsappend ='amp'heading ='Recent Posts'max ='5']”);

          ?>

          ?>

          <?php

          }

          }

          add_action( 'amp_post_template_footer', 'add_rec_to_amp_footer', 3 );

          add_action('amp_post_template_footer','add_rec_to_amp_footer',3);

下载地址
https://downloads.wordpress.org/plugin/amp-recent-posts.3.1.1.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Admiral Adblock Analytics海军上将Adblock分析
[wordpress插件] azurecurve Toggle Show/Hide天蓝色曲线切换显示/隐藏
[wordpress插件] Coop-Members (쿱 멤버스)合作社成员
[wordpress插件] AW WooCommerce TIKI ShippingAW WooCommerce TIKI送货
[wordpress插件] Digest Notifications摘要通知
随便看看
为什么微信搜一搜突然搜不到自己的公众号文章了?之前都可以 352
app调起支付,返回该商户支付权限已被取消 412
企业付款到个人银行卡 已入驻满90天,30天有交易,但还是当前商户号暂时无法开通此功能? 389
分享到朋友圈、分享给朋友不正常,分享到QQ好友正常 385
公众号认证问题? 296
个人公众号被永久封禁,如何申请注销? 546
微信公众号分享,开发工具提示正确,真机上标题和图片没有,已经是最新接口了,要怎么办? 551
request:fail url not in domain list就获取openid时候错 ? 353
微信公众号获取用户基本信息都是空的? 1454
WeUI dialog button自定义后 如何去掉两个button之间的横线啊? 471