[wordpress插件] CC Child PagesCC子页面

wordpress 插件 文章 2020-03-19 11:40 457 0 全屏看文

AI助手支持GPT4.0

评分
98
描述

CC Child Pages is a simple plugin to show links to child pages via a shortcode.

CC子页面是一个简单的插件,可通过简码显示指向子页面的链接。

Child Pages are displayed in responsive boxes, and include the page title, an excerpt and a “Read more…” link.

子页面显示在响应框中,其中包括页面标题,摘录和“更多内容...”链接。

You can choose between 1, 2, 3 & 4 column layouts.

您可以在1、2、3和4列布局中进行选择。

3 & 4 column layouts will resize to a 2 column layout on small devices to ensure that they remain readable.

3和4列的布局将在小型设备上调整为2列的布局,以确保它们保持可读性。

CC Child Pages editor button

CC子页面编辑器按钮

CC Child Pages now adds a button to the WordPress text editor, allowing you to quickly insert the shortcode and select many common options

CC子页面现在在WordPress文本编辑器中添加了一个按钮,可让您快速插入简码并选择许多常用选项

CC Child Pages widget

CC子页面小部件

CC Child Pages also includes a widget for displaying child pages within your sidebars.

CC子页面还包括一​​个小部件,用于在侧边栏中显示子页面。

The widget can be set to show the children of the current page or a specific page, or to show all pages.

可以将小部件设置为显示当前页面或特定页面的子代,或显示所有页面。

Pages can be sorted by their menu order, title or ID.

页面可以按其菜单顺序,标题或ID进行排序。

You can also select the depth of pages to be displayed.

您还可以选择要显示的页面深度。

You can now also tick the checkbox to show all pages, in which case the widget will behave much like the standard Pages widget but with additional options.

现在您还可以勾选该复选框以显示所有页面,在这种情况下,该小部件的行为与标准的Pages小部件非常相似,但是具有其他选项。

Using the shortcode

使用简码

The simplest usage would be to use the shortcode with no parameters:

最简单的用法是使用不带参数的简码:

[child_pages]

  [child_pages]

This would show the Child Pages for the current page in 2 columns.

这将在2列中显示当前页面的子页面。

You can add the cols parameter to choose the number of columns:

您可以添加 cols 参数以选择列数:

[child_pages cols="1"]

  [child_pages cols =“ 1”]

[child_pages cols="2"]

[child_pages cols =“ 2”]

[child_pages cols="3"]

[child_pages cols =“ 3”]

[child_pages cols="4"]

[child_pages cols =“ 4”]

… if cols is set to anything other than 1, 2, 3 or 4 the value will be ignored.

...如果 cols 设置为1、2、3或4以外的任何值,则该值将被忽略。

You can also show the child pages of a specific page by adding the ID of the page as follows:

您还可以通过添加页面的 ID 来显示特定页面的子页面,如下所示:

[child_pages id="42"]

  [child_pages id =“ 42”]

… or you can specify multiple IDs in a comma-separated list (does not work when using list="true")

…或您可以在逗号分隔的列表中指定多个ID(在使用 list =“ true” 时不起作用)

[child_pages id="42,53,76"]

  [child_pages id =“ 42,53,76”]

To exclude pages, use the exclude parameter.

要排除页面,请使用 exclude 参数。

This allows you to specify a comma separated list of Page IDs to be exclude from the output of the shortcode.

这样,您可以指定逗号分隔的页面ID列表,以将其排除在简码输出之外。

[child_pages exclude="5,33,45"]

  [child_pages exclude =“ 5,33,45”]

To display only specific pages, you can use the page_ids paremeter.

要仅显示特定页面,可以使用 page_ids 参数。

This accepts a comma separated list of IDs.

这接受逗号分隔的ID列表。

If this parameter is used, the id and exclude parameters are ignored.

如果使用此参数,则将忽略 id exclude 参数。

[child_pages page_ids="3,7,10,35"]

  [child_pages page_ids =“ 3,7,10,35”]

The above code will display only the listed pages.

上面的代码将仅显示列出的页面。

If you want to prefer to use text other than the standard “Read more …” to link to the pages, this can be specified with the more parameter:

如果您想使用标准的“阅读更多...”以外的文本来链接到页面,则可以使用 more 参数指定该内容:

[child_pages more="More..."]

  [child_pages more =“ More ...”]

You may also hide the “Read more …” link altogether by setting the hide_more parameter to "true":

您还可以通过将 hide_more 参数设置为“ true” 来完全隐藏“阅读更多……”链接:

[child_pages hide_more="true"]

  [child_pages hide_more =“ true”]

Since there is no other way for the visitor to link to the child page, you can choose to make the page titles link to the child page by setting the link_titles parameter to "true

由于访问者没有其他方法可以链接到子页面,因此可以通过将 link_titles 参数设置为“ true,来选择使页面标题链接到子页面。

":

[child_pages link_titles="true"]

  [child_pages link_titles =“ true”]

(This is mainly designed to be used with the hide_more parameter, but can be used independently if you want to have both the titles and “Read more …” text link to the child page.)

(主要设计为与 hide_more 参数一起使用,但是如果您希望将标题和“更多……”文本链接到子页面,则可以独立使用。)

When specifying link_titles="true", you may wish to apply your own styling to the links.

在指定 link_titles =“ true” 时,您可能希望将自己的样式应用于链接。

To do so, you can specify a style using the title_link_class parameter:

为此,您可以使用 title_link_class 参数指定样式:

[child_pages link_titles="true" title_link_class="my_title_link_class"]

  [child_pages link_titles =“ true” title_link_class =“ my_title_link_class”]

You can display a thumbnail of the featured image for each page (if set) by setting the thumbs parameter to "true":

您可以通过将 thumbs 参数设置为“ true” ,为每一页(如果设置)显示特色图像的缩略图:

[child_pages thumbs="true"]

  [child_pages thumbs =“ true”]

You can now also display thumbnails at different sizes to the default (‘medium’) size.

您现在还可以显示不同大小的缩略图,其大小与默认大小(“中”)不同。

Simply specify the thumbnail size in the thumbs parameter.

只需在 thumbs 参数中指定缩略图大小。

You can even specify custom image sizes.

您甚至可以指定自定义图像尺寸。

[child_pages thumbs='large']

  [child_pages thumbs ='large']

You can make thumbnails link to the related child page by setting the link_thumbs to "true":

您可以通过将 link_thumbs 设置为“ true” 来使缩略图链接到相关的子页面:

[child_pages thumbs='large' link_thumbs="true"]

  [child_pages thumbs ='large'link_thumbs =“ true”]

… note that specifying the link_thumbs parameter will have no effect unless the thumbs parameter is set to either true or a thumbnail size.<

…请注意,除非将 thumbs 参数设置为 true 或缩略图大小,否则指定 link_thumbs 参数将无效。

/p>

/ p>

You can specify a target for the links added by the plugin by setting the link_target parameter.

您可以通过设置 link_target 参数为插件添加的链接指定目标。

This will work exactly the same as setting the target parameter for the HTML tag:

这将与为HTML 标记设置 target 参数完全相同:

[child_pages link_target="_blank"]

  [child_pages link_target =“ _ blank”]

You can limit the length of the excerpt by specifying the words parameter:

您可以通过指定 words 参数来限制摘录的长度:

[child_pages words="10"]

  [child_pages words =“ 10”]

You can hide the excerpt altogether by setting the hide_excerpt parameter to "true":

通过将 hide_excerpt 参数设置为“ true” ,您可以完全隐藏摘录:

[child_pages hide_excerpt="true"]

  [child_pages hide_excerpt =“ true”]

You can stop Custom Excerpts from being truncated by setting the truncate_excerpt parameter to “false”:

通过将 truncate_excerpt 参数设置为“ false”,可以阻止自定义摘录被截断:

[child_pages truncate_excerpt="false"]

  [child_pages truncate_excerpt =“ false”]

… this will display custom excerpts exactly as entered without being shortened.

…这将完全按输入显示自定义摘录,而不会缩短。

(Especially useful if using the Rich Text Excerpts plugin, in which case all styling will be preserved.)

(如果使用Rich Text Excerpts插件,则特别有用,在这种情况下,所有样式都将保留。)

When truncate_excerpt is set to true, excerpts will be truncated only if they exceed the specified word count (default 55).

truncate_excerpt 设置为 true 时,摘录仅在超过指定字数(默认为55)时才会被截断。

When custom excerpts are truncated, any HTML will be removed.

自定义摘录被截断后,所有HTML都将被删除。

If you have inserted more tags into your posts/pages, you may find that the Continue reading message is included in the excerpt.

如果您在帖子/页面中插入了 more 标签,您可能会发现摘录中包含了 Continue reading 消息。

To hide this, set the hide_wp_more parameter to true:

要隐藏此设置,请将 hide_wp_more 参数设置为 true

[child_pages hide_wp_more="true"]

  [child_pages hide_wp_more =“ true”]

IF you wish to display the full contents of the listed pages, you can set the show_page_content parameter to true:

如果您希望显示列出页面的全部内容,可以将 show_page_content 参数设置为 true

[child_pages show_page_content="true"]

  [child_pages show_page_content =“ true”]

To change the order in which the child pages are listed, you can use the orderby and order parameters:

要更改子页面的列出顺序,可以使用 orderby order 参数:

[child_pages orderby="title" order="ASC"]

  [child_pages orderby =“ title” order =“ ASC”]

The orderby parameter can have one of the following values:
    

orderby 参数可以具有以下值之一:
    

menu_order (the default value) – shows the pages sorted by the order in which they appear within the WordPress admin

menu_order(默认值)–显示按在WordPress管理员中显示的顺序排序的页面

id sorts the pages according to the ID of the page

  id根据页面的ID对页面进行排序

title sorts the pages alphabetically by the title

title按标题的字母顺序对页面进行排序

slug sorts the pages alphabetically according to the slug (page_name) of the page

slug根据页面的slug(page_name)按字母顺序对页面进行排序

author sorts the pages by author

作者按作者对页面进行排序

date sorts the pages by the date they were created

日期按页面创建日期对页面进行排序

modified sorts the pages by the date they were modified

Modifyed按页面修改日期对页面进行排序

rand shows the pages in a random order

rand以随机顺序显示页面

The order parameter can be set to:

order 参数可以设置为:

ASC shows the pages in ascending order, sorted by the value of `orderby`

  ASC以升序显示页面,按“ orderby”的值排序

DESC shows the pages in descending order, sorted by the value of `orderby`

DESC按降序显示页面,按“ orderby”的值排序

You can now also use the skin parameter to choose a colour scheme for the Child Pages as follows:

您现在还可以使用 skin 参数为子页面选择一种配色方案,如下所示:

[child_pages skin="simple"] (the default colour scheme)

  [child_pages skin =“ simple”](默认配色方案)

[child_pages skin="red"]

[child_pages skin =“ red”]

[child_pages skin="green"]

[child_pages skin =“ green”]

[child_pages skin="blue"]

[child_pages skin =“ blue”]

If you want to style the child page boxes yourself, you can also specify the class parameter.

如果您想自己设置子页面框的样式,还可以指定 class 参数。

If used, this overrides the span parameter and adds the specified class name to the generated HTML:

如果使用,它将覆盖 span 参数,并将指定的类名称添加到生成的HTML中:

[child_pages class="myclass"]

  [child_pages class =“ myclass”]

If you are not using the provided skins, you can prevent the CSS file for the skins from being loaded from the CC Child Pages options under the Settings menu.

如果不使用提供的皮肤,则可以防止从“设置”菜单下的“ CC子页面”选项中加载皮肤的CSS文件。

Finally, you can also display just an unordered list (

安装步骤

    1. Upload the plugin 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/cc-child-pages.1.37.zip
-EOF-

AI助手支持GPT4.0