Title: Tekserve Single Post Shortcode
Author: bangerkuwranger
Published: <strong>2013 年 11 月 8 日</strong>
Last modified: 2013 年 11 月 9 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/tekserve-single-post-shortcode.svg)

# Tekserve Single Post Shortcode

 作者：[bangerkuwranger](https://profiles.wordpress.org/bangerkuwranger/)

[下载](https://downloads.wordpress.org/plugin/tekserve-single-post-shortcode.1.3.zip)

 * [详情](https://cn.wordpress.org/plugins/tekserve-single-post-shortcode/#description)
 * [评价](https://cn.wordpress.org/plugins/tekserve-single-post-shortcode/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/tekserve-single-post-shortcode/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/tekserve-single-post-shortcode/#developers)

 [支持](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/)

## 描述

There are plenty of plugins to show lists of posts, but if you only want to display
a condensed preview of a post on any wp page, this is the plugin for you! The shortcode
accepts the numeric id of any post as an attribute, and will display a preview that
links to that post. This preview is generated with easily styled html. To show or
hide the featured image for your single post preview, pass the attribute `showimage`
with either `hide` or `show`. It’s pretty easy!

For fun, I decided to also build a widget that does the same thing; it’s included
and can be used like any other widget. Why not?!

## 安装

 1. Upload the `tekservesinglepostshortcode` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Use the shortcode anywhere you want a condesed preview of a single post, e.g. `[
    single_post id="1" showimage="show"]`.
 4. To use the widget, go to Appearance->Widgets and drag the Tekserve Single Post 
    Widget into whatever widget area you’d like. Enter the post id, check the box if
    you want to show the featured image, and hit save.

## 常见问题

  Why would I want to use this?

You want to display a link to a single post with a brief content preview. Plenty
of plugins will create this type of object in a list, or as part of popular or related
posts, but sometimes you want to manually feature a post somewhere and not mess 
around with sticky posts or the loop. This simple shortcode does it for you without
modifying your theme’s functions.php.

You also get a widget, so there’s that!

  How can I style the output?

It’s pretty easy; just add css for the output classes and ids in your style.css 
for your theme, or enqueue a separate .css file in your theme to handle it.

Here’s a listing of targets to style the output:

_Output to Style_ _CSS target_

Single Post Container .tekserve-single-post -or- #single-post-$$ ( $$ is numerical
post id)

Featured Image .tekserve-single-post a img

Title .tekserve-single-post .tekserve-single-post-title

Date and Author .tekserve-single-post .tekserve-single-post-meta

Post Content .tekserve-single-post .tekserve-single-post-excerpt

  Where does the plugin get its output?

From the post, of course! Here are the specifics:

 * Image – Post Featured Image / Thumbnail
 * Title – Post Title
 * Meta – Post Date and Post Author
 * Excerpt – Post excerpt, if it exists. If not, first 90 characters of content,
   sans html tags

## 评价

此插件暂无评价。

## 贡献者及开发者

「Tekserve Single Post Shortcode」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ bangerkuwranger ](https://profiles.wordpress.org/bangerkuwranger/)

[帮助将「Tekserve Single Post Shortcode」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/tekserve-single-post-shortcode)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/tekserve-single-post-shortcode/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/tekserve-single-post-shortcode/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/tekserve-single-post-shortcode/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/tekserve-single-post-shortcode/)。

## 更新日志

#### 1.3

 * filtered excerpt html tags
 * added support for excerpt field

#### 1.2

 * updated file permissions

#### 1.1

 * added widget

#### 1.0

 * added shortcode

## 额外信息

 *  版本 **1.3**
 *  最后更新：**13 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 3.1 或更高版本 **
 *  已测试的最高版本为 **3.7.41**
 *  语言
 * [English (US)](https://wordpress.org/plugins/tekserve-single-post-shortcode/)
 * 标签
 * [excerpt](https://cn.wordpress.org/plugins/tags/excerpt/)[link](https://cn.wordpress.org/plugins/tags/link/)
   [preview](https://cn.wordpress.org/plugins/tags/preview/)[Single post](https://cn.wordpress.org/plugins/tags/single-post/)
   [thumbnail](https://cn.wordpress.org/plugins/tags/thumbnail/)
 *  [高级视图](https://cn.wordpress.org/plugins/tekserve-single-post-shortcode/advanced/)

## 评级

 1 星（最高 5 星）。

 *  [  0 条 5 星评价     ](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/reviews/?filter=2)
 *  [  1 条 1 星评价     ](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/reviews/)

## 贡献者

 *   [ bangerkuwranger ](https://profiles.wordpress.org/bangerkuwranger/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/tekserve-single-post-shortcode/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.chadacarino.com/burnallmoney.html)