Title: Just Post Preview Widget
Author: Alex Prokopenko / JustCoded
Published: <strong>2015 年 10 月 29 日</strong>
Last modified: 2017 年 3 月 6 日

---

搜索插件

![](https://ps.w.org/just-post-preview/assets/banner-772x250.png?rev=1470609)

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

![](https://ps.w.org/just-post-preview/assets/icon-128x128.png?rev=1470609)

# Just Post Preview Widget

 作者：[Alex Prokopenko / JustCoded](https://profiles.wordpress.org/aprokopenko/)

[下载](https://downloads.wordpress.org/plugin/just-post-preview.zip)

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

 [支持](https://wordpress.org/support/plugin/just-post-preview/)

## 描述

This plugin is for developers who need easy to edit the complex layouts and insert
different post tile blocks inside the layout,
 sidebars or page builders. By default,
it has 3 pre-defined layouts; you can rewrite them in your theme or register custom
layouts. Unfortunately the pre-defined layouts have no styles inside. (Because they
will be overwritten in the theme 100% anyway).

#### Template files

To overwrite the pre-defined templates, you should create a folder with the name`“
just-post-preview”` in the root
 of your theme and copy required templates from 
the `/wp-content/plugins/just-post-preview/layous/` folder.

File names format: `jpp_layout_{layout key}.php`

You can find PHP comments on the top of the demo templates. They help your IDE to
show you autocomplete boxes for available variables.

#### Adding custom layout

To add a custom layout, you need to add a new filter hook in your theme functions.
php file:

    ```
    add_filter('jpp_post_preview_layouts', 'my_post_preview_layouts');
    function my_post_preview_layouts($layouts){
        $layouts['my_layout_key'] = 'My custom layout';
        return $layouts;
    }
    ```

After that hook you will need to create a template file in the `/path/to/theme/just-
post-preview` folder with the name `jpp_layout_my_layout_key.php`.

#### That’s all!

FILL FREE TO CONTACT ME IF YOU FIND ANY BUGS/ISSUES!

**ISSUES TRACKER**
 The project is also available on github. Please post your issues
or feedbacks there. https://github.com/aprokopenko/just-post-preview

## 屏幕截图

 * [[
 * Widget edit screenshot
 * [[
 * Using widget inside the SiteOrigin Page builder plugin

## 安装

 1. Download, unzip and upload to your WordPress plugins directory
 2. Activate the plugin within you WordPress Administration Backend
 3. That’s it – you can add a new widget now

## 常见问题

  Installation Instructions

 1. Download, unzip and upload to your WordPress plugins directory
 2. Activate the plugin within you WordPress Administration Backend
 3. That’s it – you can add a new widget now

## 评价

![](https://secure.gravatar.com/avatar/48439041a6502e1064e741afd868b7c0f8d554b9d216b30308d8911d26f4d3f9?
s=60&d=retro&r=g)

### 󠀁[i think it’s good](https://wordpress.org/support/topic/i-think-its-good/)󠁿

 [Alex Prokopenko / JustCoded](https://profiles.wordpress.org/aprokopenko/) 2017
年 3 月 1 日

We use SiteOrigin Page Builder plugin in our development and usually you need to
add preview of some post or content on some landing page. This plugins adds ability
to do that very quickly. And you can customize it for each site with custom templates
in a 15 minutes.

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/just-post-preview/reviews/)

## 贡献者及开发者

「Just Post Preview Widget」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Alex Prokopenko / JustCoded ](https://profiles.wordpress.org/aprokopenko/)

[帮助将「Just Post Preview Widget」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/just-post-preview)

### 对开发感兴趣吗?

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

## 更新日志

#### Version 1.1.1

    ```
    * Bug fix: Merged Pull Request from @rudibatt: missing break in templates load loop.
    ```

#### Version 1.1

    ```
    * New feature: Ability to search without specifying post type (beta)
    * New hook: You can control the templates source with new hook `jpp_post_preview_template`
    * Bug fix: PHP 7+ compatibility fix
    ```

#### Version 1.0

    ```
    * Plugin base with 3 pre-defined layouts
    ```

## 额外信息

 *  版本 **1.1.1**
 *  最后更新：**9 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 4.0 或更高版本 **
 *  已测试的最高版本为 **4.8.28**
 *  语言
 * [English (US)](https://wordpress.org/plugins/just-post-preview/)
 * 标签
 * [developer](https://cn.wordpress.org/plugins/tags/developer/)[layouts](https://cn.wordpress.org/plugins/tags/layouts/)
   [post preview](https://cn.wordpress.org/plugins/tags/post-preview/)[widget](https://cn.wordpress.org/plugins/tags/widget/)
 *  [高级视图](https://cn.wordpress.org/plugins/just-post-preview/advanced/)

## 评级

 5 星（最高 5 星）。

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

[Your review](https://wordpress.org/support/plugin/just-post-preview/reviews/#new-post)

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

## 贡献者

 *   [ Alex Prokopenko / JustCoded ](https://profiles.wordpress.org/aprokopenko/)

## 支持

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

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