CompositePost let’s you insert posts/pages inside other posts/pages.
CompositePost,可让您在其他帖子/页面中插入帖子/页面。 p>
Usage
用法 h3>
Write anywhere on a post:
写在帖子的任何地方: p>
[composite option=”value”]
[复合选项=“值”] p>
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)。 p>
Example
示例 h3>
Show all posts from category Projects and include post with ID = 1:
显示“项目”类别中的所有帖子,并包括ID = 1的帖子。 p>
[composite category_name=”Projects” include=”1″]
[composite category_name =“项目” include =“ 1”] p>
Templates
模板 h3>
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:
您可以根据需要拥有任意数量的模板,只需指定要使用的模板即可,例如: p>
[composite category_name=”Projects” template=”my_template”]
[composite category_name =“项目” template =“ my_template”] p>
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中查找文件 p>