小工具      在线工具  汉语词典  dos游戏  css  js  c++  java

wordpress列数布局_如何在WordPress中列出未来即将发布的预定帖子

列表,python,java,github,php 额外说明

收录于:23天前

WordPress 列布局

最近,我们的一位用户询问我们如何在 WordPress 中列出计划的或未来即将发布的帖子。显示即将发布的帖子有助于吸引人们订阅您的博客。在本文中,我们将向您展示如何在 WordPress 侧边栏中显示未来即将发布的帖子。

最近,我们的一位用户询问我们如何在 WordPress 中列出计划的或将来的帖子。显示即将发布的帖子有助于吸引人们订阅您的博客。在本文中,我们将向您展示如何在 WordPress 侧边栏中显示未来的帖子。

Show scheduled and future upcoming posts
WordPress中计划或将来要发布的帖子是什么? What is Scheduled or Future Upcoming Posts in WordPress?

If you have been blogging for a while, then you have probably noticed that publishing posts on a certain time gets more people to read it. If you are new to blogging and don’t know what time you get the most visitors, then you should start using 谷歌分析 to track this information.

如果您已经写了一段时间的博客,那么您可能已经注意到,在特定时间发布帖子会使更多的人阅读它。 如果您不熟悉博客,并且不知道什么时候获得最多的访问者,则应该开始使用谷歌分析来跟踪此信息。

The problem is that you cannot just sit around and wait for that time to hit the publish button. That’s why WordPress comes with built-in scheduling feature. It allows you to 安排你的帖子 to be published later.

问题在于,您不能只是闲坐一会儿并等待该时间来点击“发布”按钮。 这就是WordPress带有内置计划功能的原因。 它使您可以安排您的帖子稍后发布。

Using scheduling you can focus on creating content and 管理您的编辑日历 like a pro.

使用计划,您可以专注于创建内容和像专业人士一样管理编辑日历

话虽如此,让我们看看如何在 WordPress 中展示即将发布的帖子并使用它来吸引更多订阅者。

话虽如此,让我们看看如何在 WordPress 中展示即将发布的帖子并使用它来吸引更多订阅者。

为了方便起见,我们创建了一个视频教程,介绍如何列出未来即将发布的预定帖子,您可以在下面观看。

为了简单起见,我们创建了一个视频教程,介绍如何列出未来即将发布的预定帖子,您可以在下面观看。

演示地址

但是,如果您只想遵循文本说明,那么您可以按照我们的分步教程了解如何在 WordPress 中列出未来即将发布的预定帖子。

但是,如果您只想遵循文本说明,则可以按照我们的分步教程了解如何在 WordPress 中列出未来计划的帖子。

方法1:显示带有插件的预定或将来的帖子 Method 1: Showing Scheduled or Future Posts with Plugin

First thing you need to do is install and activate SOUP – 展示即将发布的帖子 plugin. For more details, see our step by step guide on 如何安装 WordPress 插件.

您需要做的第一件事是安装并激活SOUP – 展示即将发布的帖子插件。 有关更多详细信息,请参阅有关如何安装 WordPress 插件步指南。

Upon activation, you need to visit 外观 » 小部件 page. There you will find ‘Upcoming Posts’ widget under the list of available widgets. Simply add the widget to your sidebar where you to display scheduled posts.

激活后,您需要访问外观 » 小部件页面。 在此处,您可以在可用小部件列表下找到“即将发布的帖子”小部件。 只需将小部件添加到侧边栏即可显示预定的帖子。

Upcoming posts widget

The widget settings allow you to choose the number of scheduled posts you want to show. You can also show dates next to them, link to your RSS订阅, or link to a page where users can signup for your 电子邮件列表.

小部件设置允许您选择要显示的预定帖子的数量。 您还可以在日期旁边显示日期,链接到RSS订阅或链接到用户可以在其中注册您的电子邮件列表页面

单击保存按钮来存储您的小部件设置。

单击“保存”按钮来存储小部件设置。

您现在可以访问您的网站以查看正在运行的小部件。

现在您可以访问您的网站以查看正在运行的小部件。

Preview of upcoming posts in sidebar
方法2:手动显示预定或即将发布的帖子 Method 2: Showing Scheduled or Upcoming Posts Manually

Simply add this code to your theme’s 函数.php file or a 特定于站点的插件.

只需将此代码添加到主题的函数.php文件或具体的只需插入网站即可



function wpb_upcoming_posts() { 
	// The query to fetch future posts
	$the_query = new WP_Query(array( 
		'post_status' => 'future',
		'posts_per_page' => 3,
		'orderby' => 'date',
		'order' => 'ASC'
	));

// The loop to display posts
if ( $the_query->have_posts() ) {
	echo '<ul>';
	while ( $the_query->have_posts() ) {
		$the_query->the_post();
		$output .= '<li>' . get_the_title() .' ('.  get_the_time('d-M-Y') . ')</li>';
	}
	echo '</ul>';

} else {
	// Show this when no future posts are found
	$output .= '<p>No posts planned yet.</p>';
}

// Reset post data
wp_reset_postdata();

// Return output

return $output; 
} 
// Add shortcode
add_shortcode('upcoming_posts', 'wpb_upcoming_posts'); 
// Enable shortcode execution inside text widgets
add_filter('widget_text', 'do_shortcode');


Now you can visit 外观 » 小部件 page. Add a text widget to your sidebar where you want to display upcoming posts and add this 短代码 inside the widget.

现在您可以访问外观 » 小部件页面。 在您要显示即将发布的帖子的边栏中添加一个文本小部件,并将此短代码添加到小部件中。

[upcoming_posts]

[upcoming_posts]

Adding upcoming posts shortcode in a text widget

单击保存按钮来存储您的小部件设置。

单击“保存”按钮来存储小部件设置。

您现在可以访问您的网站,在侧边栏中查看即将发布的预定帖子。您还可以在子主题的帖子、页面或模板中使用此短代码。

您现在可以访问您的网站并在侧边栏中查看即将发布的预定帖子。您还可以在子主题的帖子、页面或模板中使用此短代码。

We hope this article helped you learn how to show scheduled posts in your WordPress sidebar. You may also want to see our list of these 25 个最适合您网站的 WordPress 小部件.

我们希望本文能帮助您学习如何在WordPress侧边栏中显示预定的帖子。 您可能还想查看我们的25 个对您的网站最有用的 WordPress 小部件列表。

If you liked this article, then please subscribe to our YouTube 频道 for WordPress video tutorials. You can also find us on 推特 and Facebook.

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

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-list-future-upcoming-posts-in-wordpress/

WordPress 列布局

. . .

相关推荐

额外说明

C++_知识点——reinterpret_cast

reinterpret_cast 运算符是用来处理无关类型之间的转换;它会产生一个新的值,这个值会有与原始参数(expressoin)有完全相同的比特位。重新解释类型,既不检查指向的内容,也不检查指针类型本身;但要求转换前后的类型所占用内存大小一致,否则

额外说明

[Eigen中文文档] 扩展/自定义Eigen(二)

文档总目录 本文目录 使用nullary-expressions操作矩阵 示例 1:循环矩阵 示例 2:索引行和列 使用nullary-expressions操作矩阵 英文原文(Matrix manipulation via nullary-expres

额外说明

VS1053

     (1)VS1053通过7根线同MCU连接,如下:   VS_RST:VS1053的复位信号线,低电平有效。         VS_DREQ:数据请求信号(高电平有效),用来通知主机,VS1053是否                      

额外说明

springboot整合ehcache+redis实现双缓存

在一些对并发业务要求较高的场景下,对页面数据的响应是个急需解决的问题,对后端来说,ehcache+redis实现双缓存是解决这一问题的不错思路,而且在不少的电商项目中得到了很好的验证,但我在网上搜寻资料的时候总觉得一些材料不能很好的说明这个问题,要么太复

额外说明

深度学习资源

蓝皮书(统计学习方法) 《统计学习方法》(李航)读书笔记(完结) https://www.cnblogs.com/limitlessun/p/8611103.html PDF: http://vdisk.weibo.com/s/vfFpMc1YgPOr

额外说明

Win10访问Linux分区

从Win10预览版本20211开始,支持访问Linux分区,因此也不再需要用其他第三方工具来访问了。具体做法如下: 以管理员身份运行Powershell,然后输入命令wmic diskdrive list brief,找到你想要Mount的磁盘的Devi

额外说明

无心剑中译叶芝《情愁》

The Sorrow of Love 情愁 Yeats 叶芝 The quarrel of the sparrows in the eaves, The full round moon and the star-laden sky, And the lo

额外说明

学习在Web中使用log4net

由于打算在近期的项目量使用log4net,于是上网搜了一堆相关文档,自己动手写示例时却发现运行结果总是与网上的不尽相同,主要在如下二点: 1.配置文件的读取    在项目的AssemblyInfo.cs文件里添加以下的语句    [assembly:lo

额外说明

Windows系统丢失SensApi.dll文件导致程序无法运行问题

其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或没有安装一些系统软件平台所需要的动态链接库,这时你可以下载这个SensApi.dll文件(

额外说明

解决Windows缺少找不到mfc80KOR.dll问题

其实很多用户玩单机游戏或者安装软件的时候就出现过这种问题,如果是新手第一时间会认为是软件或游戏出错了,其实并不是这样,其主要原因就是你电脑系统的该dll文件丢失了或者损坏了,这时你只需下载这个mfc80KOR.dll文件进行安装(前提是找到适合的版本),

ads via 小工具