我运行了一个多作者网站,并在wp admin中创建了一个插件,作者可以在其中相互连接和协作。为了增强它,我想显示一个最新帖子的列表,该列表应如下所示:
如图所示,该列表应包含最新的10篇帖子,其中包含用户名、链接的帖子标题以及发布时间(发布时间或发布时间)。
用于此的HTML应为:
<table class="widefat">
<thead><tr><th scope="col">User</th><th scope="col">Post</th><th scope="col">Time</th></tr></thead>
<tfoot><tr><th scope="col">User</th><th scope="col">Post</th><th scope="col">Time</th></tr></tfoot>
<tbody>
<tr>
<td title="Username">Username</td>
<td><a href="URL">Post title</a></td>
<td title="2012-11-07 16:16:37">8 hours ago</td>
</tr>
</tbody>
</table>
如何创建这样的列表?请注意,此列表仅在wp admin中使用。