[wordpress插件] Custom Index Shortcode自定义索引简码

wordpress 插件 文章 2020-04-08 12:10 451 0 全屏看文

AI助手支持GPT4.0

评分
60
描述

This plugin uses the get_pages() function to retrieve a list of pages and puts it in a indented-list-style output.

此插件使用get_pages()函数检索页面列表,并将其放入缩进列表样式的输出中。

The list of pages and the output layout can be customized using arguments;

页面列表和输出布局可以使用参数进行自定义;

some of them are from the get_pages() arguments list, others are brand new and

其中一些来自get_pages()参数列表,另一些是全新的,

output related only.

输出仅相关。

Below there is a list of the arguments you can use so far:

下面是到目前为止可以使用的参数列表:

[1] title –> choose if you want a title to be displayed.

[1]标题–>选择是否要显示标题。

default is no title.

默认为无标题。

[2] titlesize –> select the size of the title.

[2]标题大小–>选择标题的大小。

[3] ID –> you have choose the parent of the list.

[3] ID –>您已选择列表的父级。

default is the id of the page you are in.

默认值为您所在页面的ID。

[4] depth –> choose how many generation of children do you want the list to show.

[4]深度–>选择您希望列表显示多少代孩子。

[5] author –> select if you want to display the author username (with or without link to the author posts).

[5]作者–>选择是否要显示作者用户名(带有或不带有指向作者帖子的链接)。

[6] orderby –> this affects the sort_order argument in get_pages() function.

[6] orderby –>这会影响get_pages()函数中的sort_order参数。

choices are: ‘post_title’, ‘menu_order’, ‘post_date’, ‘post_modified’,’ID’, ‘post_author’, ‘post_name’.

选项包括:“ post_title”,“ menu_order”,“ post_date”,“ post_modified”,“ ID”,“ post_author”,“ post_name”。

default is ‘post_title’ .

默认值为“ post_title”。

[7] order –> ASC, DESC.

[7]订单–> ASC,DESC。

[8] list –> choose between ‘unordered’ or ‘ordered’ list.

[8]列表–>在“无序”或“有序”列表之间进行选择。

安装步骤

    1. Upload the entire folder ‘custom-index-shortcode’ to the /wp-content/plugins/ directory.
    2. 将整个文件夹“ custom-index-shortcode”上传到 / wp-content / plugins / 目录。

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

    5. If you want to use the shortcode in your templates, simply place

    6. 如果要在模板中使用简码,只需将 <?php echo do_shortcode('[custom-index]');

      ?> everywhere in the code.

      ?> 在代码中的任何地方。

      Just remember to add manually the arguments.

    7. 只需记住手动添加参数即可。

下载地址
https://downloads.wordpress.org/plugin/custom-index-shortcode.1.3.zip
-EOF-

AI助手支持GPT4.0