[wordpress插件] Display Last Post(s)显示最新帖子

wordpress 插件 文章 2020-04-19 11:21 481 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Display Last Posts is a plugin that allows you to display the last post(s) (by default, the last one only) anywhere on your blog.

显示最新帖子是一个插件,可让您在博客的任何位置显示最新帖子(默认情况下,仅显示最后一篇)。

Official page and french translation : http://www.fb-graphic.com/bonus/display-last-posts-wordpress-plugin

官方页面和法语翻译:http://www.fb-graphic.com/bonus/display-last-posts-wordpress-plugin

Two ways are available: using a shortcode in posts or pages, within the CMS, or putting a small PHP code in a template of your theme.

有两种方法:在CMS中在帖子或页面中使用简码,或在主题模板中放入小的PHP代码。

shortcode : [last-posts] or [last-posts nb=”5″ cont=”excerpt”]

简码:[最后发布]或[最后发布nb =” 5” cont =”摘录”]

code PHP : < ?php lastPosts(”,”);

代码PHP :<?php lastPosts(”,”);

?> or < ?php lastPosts(5,’excerpt’);

?>或<?php lastPosts(5,'摘录');

?> (suppress space between < and ?)

?>(压缩<和?之间的空格)

The shortcode is: [last-posts]

简写为: [最新帖子]

By default, only the last post is displayed, with its whole content.

默认情况下,仅显示最后一个帖子及其全部内容。

Optional arguments, ex.: [last-posts nb=”5″ cont=”excerpt”] – with [nb] you specify the quantity of posts you want to display (always newest first), and

可选参数,例如: [last-posts nb =” 5” cont =“ excerpt”] –使用[nb]指定要显示的帖子数量(始终是最新的)

with [cont=”excerpt”] you specify that only the excerpt of the posts will be displayed.

使用[cont =“ excerpt”],您可以指定仅显示帖子的摘录。

The PHP code for templates is: < ?php lastPosts(”,”);

模板的PHP代码为: <?php lastPosts(”,”);

?>

?>

By default, only the last post is displayed, with its whole content.

默认情况下,仅显示最后一个帖子及其全部内容。

Optional arguments, ex.: < ?php lastPosts(5,’extrait’);

可选参数,例如: <?php lastPosts(5,'extrait');

?> – the first argument specify the number of posts to display (always newest first), and the second one specify that only the excerpt must be displayed.

?> –第一个参数指定要显示的帖子数(始终是最新的),第二个参数指定仅必须显示摘录。

Display Last Post(s) is widely inspired by the sc_liste() function given here:

显示最新帖子受到以下给定的sc_liste()函数的广泛启发:

http://www.webinventif.fr/wordpress-creation-de-shortcode-avance/

http://www.webinventif.fr/wordpress-creation-de-shortcode-avance/

CSS styling

CSS样式

The code produced is included in a

产生的代码包含在

<

<< / p>

div> with class=”display-last-post” (

div>带有class =“ display-last-post”(

<

<< / p>

div class=”display-last-posts”>).

div class =“ display-last-posts”>)。

You can then easily apply a remote CSS.

然后,您可以轻松地应用远程CSS。

Bug Reports / Suggestions

错误报告/建议

You can contact me here: http://www.fb-graphic.com/fb-contact.php

您可以在这里与我联系:http://www.fb-graphic.com/fb-contact.php

Thanks to specify [ Display Last Post ] in the title.

感谢您在标题中指定[显示最新帖子]。

Donate Link

捐赠链接

If you wish to donate, please go there: http://www.fb-graphic.com/dons/

如果您想捐赠,请去那里:http://www.fb-graphic.com/dons/

Thanks!

谢谢!

License

许可证

copyright (c) 2010 Francois Barret < www.fb-graphic.com >

版权所有(c)2010 Francois Barret

The free distribution, use and modification of this source are permitted provided they meet the following clauses:

只要符合以下条款,便可以免费分发,使用和修改此来源:

    • This entire notice and the entire license must be preserved.
    • 这整个通知和整个许可证必须保留。

    • The name and internet references (web adresses) of the author must stay visible whatever the mode of distribution and modification of the source.
    • 无论来源的分发和修改方式如何,作者的姓名和互联网参考(网络地址)都必须保持可见。

    THIS SOFTWARE IS PROVIDED BY THE AUTHOR “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

    本软件由作者“按原样”提供,不提供任何明示或暗示的担保,包括但不限于对适销性和特定用途的适用性的暗示担保。

    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION

    在任何情况下,作者均不对任何直接,间接,偶发,特殊,特殊或后果性损害(包括但不限于购买替代商品或服务;使用,数据或利润损失;或业务中断)承担责任

    ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    )无论是基于合同,严格责任还是侵权(包括疏忽或其他方式)造成的任何责任理论,无论是基于使用本软件的任何方式(即使已告知可能),也是如此。

    >

    >

安装步骤

Realised under WordPress 2.9.2 – at least valid for this version.

在WordPress 2.9.2下实现–至少对此版本有效。

Download and unzip “display-last-post.zip” – place the “display-last-post” folder in the wp-content/plugins folder.

下载并解压缩“ display-last-post.zip” –将“ display-last-post”文件夹放置在wp-content / plugins文件夹中。

Then activate Display Last Post(s) form the Plugins panel.

然后从“插件”面板中激活“显示最新帖子”。

下载地址
https://downloads.wordpress.org/plugin/display-last-posts.zip
-EOF-

AI助手支持GPT4.0