AI助手支持GPT4.0
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插件),添加标题并为链接的总数设置限制。 p>
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内容中,并具有一系列新功能: p>
Post type support: return posts, pages or any other including custom post type
帖子类型支持:返回帖子,页面或其他任何类型,包括自定义帖子类型 p>
li>
Display featured images
显示特色图片 p>
Display the date
显示日期 p>
Exclude posts by ID
按ID排除帖子 p>
Change the priority of the hook
更改挂钩的优先级 p>
ul>
As well the default options of setting a custom endpoint, heading and max number of posts.
还有设置自定义端点,标题和最大帖子数的默认选项。 p>
With the 2.0 update we completely rewritten the plugin (better queries, better compatibility, bug fixes) with you in mind. 在2.0更新中,我们完全记住了插件 strong>(更好的查询,更好的兼容性,错误修复)。Although we’ve tested 尽管我们已经测试过 extensively something might have slipped through, kindly let us know if you find any<如果发现有任何请告诉我们, br /> br /> inconsistencies, thank you!不一致,谢谢! p> blockquote>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.并在存储库中创建一个常见问题解答。 p>
With the 2.0 update we completely rewritten the plugin (better queries, better compatibility, bug fixes) with you in mind. 在2.0更新中,我们完全记住了插件 strong>(更好的查询,更好的兼容性,错误修复)。Although we’ve tested 尽管我们已经测试过 extensively something might have slipped through, kindly let us know if you find any<如果发现有任何请告诉我们, br /> br /> inconsistencies, thank you!不一致,谢谢! p>
With the 2.0 update we completely rewritten the plugin (better queries, better compatibility, bug fixes) with you in mind.
在2.0更新中,我们完全记住了插件 strong>(更好的查询,更好的兼容性,错误修复)。Although we’ve tested 尽管我们已经测试过 extensively something might have slipped through, kindly let us know if you find any<如果发现有任何请告诉我们, br /> br /> inconsistencies, thank you!不一致,谢谢! p>
Although we’ve tested
尽管我们已经测试过
extensively something might have slipped through, kindly let us know if you find any<
如果发现有任何请告诉我们,
br />
inconsistencies, thank you!
不一致,谢谢! p>
blockquote>
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.
并在存储库中创建一个常见问题解答。 p>
ol>
<?php echo do_shortcode(“ [amp-related-posts]”); ?>?> code> strong> p>Shortcode: Customizing the display of the AMP Related Posts plugin: 简短代码:自定义AMP相关帖子插件的显示: strong> p>append=’amp’ change the endpoint to suit your own. append ='amp' strong>更改端点以适合您自己的端点。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插件)。 li> ul>Example: append=’amp-post’ will generate a slug ‘yourwebsite.nl/post/amp-post/’示例: append =” amp-post” strong>将生成一个“ yourwebsite.nl/post/amp-post /” p>heading=’Related Posts’ will add an H3 heading, standard: none heading =“相关帖子” strong>将添加标准的H3标题:无 p> li>max=’5′ will set a limit to the amount of posts displayed:, standard: 10 max ='5' strong>将对显示的帖子数设置限制:标准:10 p> li>The code can now look like this:代码现在可以如下所示: p> li> ul> <?php echo do_shortcode(“ [amp-related-posts append ='amp'heading ='Related Posts'max ='5']”); ?>?> code> strong> p>Depreciated and backwards compatibility折旧和向后兼容 h4>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:如果您希望继续使用钩子,请像这样更新它: p>//* Add content to the AMP template footer (AMP plugin Automattic) // **将内容添加到AMP模板页脚(AMP插件Automattic)//* Place in your theme's functions.php// *放在主题的functions.php中function add_rel_to_amp_footer() {函数add_rel_to_amp_footer(){if ( function_exists('is_amp_endpoint') )如果(function_exists('is_amp_endpoint'))?>?><?php echo do_shortcode(“ [[amp-related-posts append ='amp'heading ='Related Posts'max ='5']”]); ?>?><?php}}add_action( 'amp_post_template_footer', 'add_rel_to_amp_footer', 3 );add_action('amp_post_template_footer','add_rel_to_amp_footer',3); code> pre>
<?php echo do_shortcode(“ [amp-related-posts]”); ?>
?>
?> code> strong> p>
Shortcode: Customizing the display of the AMP Related Posts plugin:
简短代码:自定义AMP相关帖子插件的显示: strong> p>append=’amp’ change the endpoint to suit your own. append ='amp' strong>更改端点以适合您自己的端点。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插件)。 li> ul>Example: append=’amp-post’ will generate a slug ‘yourwebsite.nl/post/amp-post/’示例: append =” amp-post” strong>将生成一个“ yourwebsite.nl/post/amp-post /” p>heading=’Related Posts’ will add an H3 heading, standard: none heading =“相关帖子” strong>将添加标准的H3标题:无 p> li>max=’5′ will set a limit to the amount of posts displayed:, standard: 10 max ='5' strong>将对显示的帖子数设置限制:标准:10 p> li>The code can now look like this:代码现在可以如下所示: p> li> ul> <?php echo do_shortcode(“ [amp-related-posts append ='amp'heading ='Related Posts'max ='5']”); ?>?> code> strong> p>Depreciated and backwards compatibility折旧和向后兼容 h4>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:如果您希望继续使用钩子,请像这样更新它: p>//* Add content to the AMP template footer (AMP plugin Automattic) // **将内容添加到AMP模板页脚(AMP插件Automattic)//* Place in your theme's functions.php// *放在主题的functions.php中function add_rel_to_amp_footer() {函数add_rel_to_amp_footer(){if ( function_exists('is_amp_endpoint') )如果(function_exists('is_amp_endpoint'))?>?><?php echo do_shortcode(“ [[amp-related-posts append ='amp'heading ='Related Posts'max ='5']”]); ?>?><?php}}add_action( 'amp_post_template_footer', 'add_rel_to_amp_footer', 3 );add_action('amp_post_template_footer','add_rel_to_amp_footer',3); code> pre>
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插件)。 li>
Example: append=’amp-post’ will generate a slug ‘yourwebsite.nl/post/amp-post/’
示例: append =” amp-post” strong>将生成一个“ yourwebsite.nl/post/amp-post /” p>heading=’Related Posts’ will add an H3 heading, standard: none heading =“相关帖子” strong>将添加标准的H3标题:无 p> li>max=’5′ will set a limit to the amount of posts displayed:, standard: 10 max ='5' strong>将对显示的帖子数设置限制:标准:10 p> li>The code can now look like this:代码现在可以如下所示: p> li> ul> <?php echo do_shortcode(“ [amp-related-posts append ='amp'heading ='Related Posts'max ='5']”); ?>?> code> strong> p>Depreciated and backwards compatibility折旧和向后兼容 h4>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:如果您希望继续使用钩子,请像这样更新它: p>//* Add content to the AMP template footer (AMP plugin Automattic) // **将内容添加到AMP模板页脚(AMP插件Automattic)//* Place in your theme's functions.php// *放在主题的functions.php中function add_rel_to_amp_footer() {函数add_rel_to_amp_footer(){if ( function_exists('is_amp_endpoint') )如果(function_exists('is_amp_endpoint'))?>?><?php echo do_shortcode(“ [[amp-related-posts append ='amp'heading ='Related Posts'max ='5']”]); ?>?><?php}}add_action( 'amp_post_template_footer', 'add_rel_to_amp_footer', 3 );add_action('amp_post_template_footer','add_rel_to_amp_footer',3); code> pre>
heading=’Related Posts’ will add an H3 heading, standard: none
heading =“相关帖子” strong>将添加标准的H3标题:无 p>
max=’5′ will set a limit to the amount of posts displayed:, standard: 10
max ='5' strong>将对显示的帖子数设置限制:标准:10 p>
The code can now look like this:
代码现在可以如下所示: p>
<?php echo do_shortcode(“ [amp-related-posts append ='amp'heading ='Related Posts'max ='5']”); ?>?> code> strong> p>Depreciated and backwards compatibility折旧和向后兼容 h4>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:如果您希望继续使用钩子,请像这样更新它: p>//* Add content to the AMP template footer (AMP plugin Automattic) // **将内容添加到AMP模板页脚(AMP插件Automattic)//* Place in your theme's functions.php// *放在主题的functions.php中function add_rel_to_amp_footer() {函数add_rel_to_amp_footer(){if ( function_exists('is_amp_endpoint') )如果(function_exists('is_amp_endpoint'))?>?><?php echo do_shortcode(“ [[amp-related-posts append ='amp'heading ='Related Posts'max ='5']”]); ?>?><?php}}add_action( 'amp_post_template_footer', 'add_rel_to_amp_footer', 3 );add_action('amp_post_template_footer','add_rel_to_amp_footer',3); code> pre>
<?php echo do_shortcode(“ [amp-related-posts append ='amp'heading ='Related Posts'max ='5']”); ?>
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:
如果您希望继续使用钩子,请像这样更新它: p>
//* Add content to the AMP template footer (AMP plugin Automattic) // **将内容添加到AMP模板页脚(AMP插件Automattic)//* Place in your theme's functions.php// *放在主题的functions.php中function add_rel_to_amp_footer() {函数add_rel_to_amp_footer(){if ( function_exists('is_amp_endpoint') )如果(function_exists('is_amp_endpoint'))?>?><?php echo do_shortcode(“ [[amp-related-posts append ='amp'heading ='Related Posts'max ='5']”]); ?>?><?php}}add_action( 'amp_post_template_footer', 'add_rel_to_amp_footer', 3 );add_action('amp_post_template_footer','add_rel_to_amp_footer',3); code> pre>
// **将内容添加到AMP模板页脚(AMP插件Automattic)//* Place in your theme's functions.php// *放在主题的functions.php中function add_rel_to_amp_footer() {函数add_rel_to_amp_footer(){if ( function_exists('is_amp_endpoint') )如果(function_exists('is_amp_endpoint'))?>?><?php echo do_shortcode(“ [[amp-related-posts append ='amp'heading ='Related Posts'max ='5']”]); ?>?><?php}}add_action( 'amp_post_template_footer', 'add_rel_to_amp_footer', 3 );add_action('amp_post_template_footer','add_rel_to_amp_footer',3);
//* Place in your theme's functions.php
// *放在主题的functions.php中
function add_rel_to_amp_footer() {
函数add_rel_to_amp_footer(){
if ( function_exists('is_amp_endpoint') )
如果(function_exists('is_amp_endpoint'))
?>
<?php echo do_shortcode(“ [[amp-related-posts append ='amp'heading ='Related Posts'max ='5']”]);
<?php
}
add_action( 'amp_post_template_footer', 'add_rel_to_amp_footer', 3 );
add_action('amp_post_template_footer','add_rel_to_amp_footer',3);
code> pre>
原文出处:http://www.sanshu.cn/a/2292.html
群主管理都是支付大佬