[wordpress插件] Composite Post复合柱

wordpress 插件 文章 2020-03-30 00:10 0 212 全屏看文
评分
0
描述

CompositePost let’s you insert posts/pages inside other posts/pages.

CompositePost,可让您在其他帖子/页面中插入帖子/页面。

Usage

用法

Write anywhere on a post:

写在帖子的任何地方:

[composite option=”value”]

[复合选项=“值”]

You can specify one or more options.

您可以指定一个或多个选项。

The options are the same used in the get_posts() function (see https://codex.wordpress.org/Template_Tags/get_posts).

这些选项与get_posts()函数中使用的选项相同(请参阅https://codex.wordpress.org/Template_Tags/get_posts)。

Example

示例

Show all posts from category Projects and include post with ID = 1:

显示“项目”类别中的所有帖子,并包括ID = 1的帖子。

[composite category_name=”Projects” include=”1″]

[composite category_name =“项目” include =“ 1”]

Templates

模板

CompositePost create a loop using a template located in the plugin’s folder (usually /wordpress/wp-content/plugins/composite_post).

CompositePost使用位于插件文件夹中的模板(通常是/ wordpress / wp-content / plugins / composite_post)创建循环。

The default template is /wordpress/wp-content/plugins/composite_post/default.php.

默认模板是/wordpress/wp-content/plugins/composite_post/default.php。

You can have as many templates as you want, just specify wich one to use, like this:

您可以根据需要拥有任意数量的模板,只需指定要使用的模板即可,例如:

[composite category_name=”Projects” template=”my_template”]

[composite category_name =“项目” template =“ my_template”]

CompositePost will look for the file at /wordpress/wp-content/plugins/composite_post/my_template.php

CompositePost将在/wordpress/wp-content/plugins/composite_post/my_template.php中查找文件

安装步骤

    1. Upload plugin folder to the /wp-content/plugins/ directory
    2. 将插件文件夹上传到 / wp-content / plugins / 目录

    3. Activate the plugin through the ‘Plugins’ menu in WordPress
    4. 通过WordPress中的“插件”菜单激活插件

下载地址
https://downloads.wordpress.org/plugin/compositepost.zip
-EOF-