[wordpress插件] Child Pages Shortcode子页面简码

wordpress 插件 文章 2020-03-22 23:30 500 0 全屏看文

AI助手支持GPT4.0

评分
94
描述

You can use shortcode for display child pages from the page.

您可以使用简码显示页面中的子页面。

This plugin maintained on GitHub.

此插件在GitHub上维护。

Some features

某些功能

    • This plugin will add shortcode [child_pages] display child pages.
    • 此插件将添加简码 [child_pages] 显示子页面。

    • You can customize default HTML template on your plugin.
    • 您可以在插件上自定义默认HTML模板。

    • This plugin will be able to “excerpt” to the pages.
    • 此插件将能够“摘录”到页面。

    Example

    示例

    Display child pages of the current page.
        

    显示当前页面的子页面。
        

    [child_pages width=”33%”]

    [child_pages width =” 33%”]

    Args

    Args

      • id – ID of page (Optional)
      • id –页面ID(可选)

      • size – Post thumbnail size.

      • size –发布缩略图的大小。

        e.g.

        例如

        ‘thumbnail’ or ‘large’

      • “缩略图”或“大”

      • width – width of block for child pages.
      • width –子页面的块宽度。

      • disable_shortcode – Shortcode not work in the template if set true.
      • disable_shortcode –如果设置为true,则短码在模板中不起作用。

      • disable_excerpt_filters – filters not work for the excerpt if set true.
      • disable_excerpt_filters –如果设置为true,则筛选器不适用于摘录。

      filter hooks example

      过滤器挂钩示例

      Filter for query_posts() query.

      query_posts()查询的过滤器。

        <?php    

      // default args    

      //默认参数    

      $args = array(        

      $ args =数组(        

      'post_status' => 'publish',        

      'post_status'=>'发布',        

      'post_type' => 'page',        

      'post_type'=>'页面',        

      'post_parent' => $id_for_the_post,        

      'post_parent'=> $ id_for_the_post,        

      'orderby' => 'menu_order',        

      'orderby'=>'menu_order',        

      'order' => 'ASC',        

      '订单'=>'ASC',        

      'nopaging' => true,    

      'nopaging'=>是的,    

      );    

      );    

      add_filters('child-pages-shortcode-query', "my_query");    

      add_filters('child-pages-shortcode-query',“ my_query”);    

      function my_query($args) {        

      函数my_query($ args){        

      //        

      //        

      // some code here        

      //这里的一些代码        

      //        

      //        

      return $args;    

      返回$ args;    

      }

      }

      ?>

      ?>

      Filter for default template.

      过滤默认模板。

        <?php    

      add_filter("child-pages-shortcode-template", "my_template");    

      add_filter(“ child-pages-shortcode-template”,“ my_template”);    

      function my_template($template) {        

      函数my_template($ template){        

      return '

      ';    

      返回'

      %post_thumb% ”;    

      }

      }

      ?>

      ?>

      Filter for stylesheet URI.

      过滤样式表URI。

        <?php    

      add_filter("child-pages-shortcode-stylesheet", "my_style");    

      add_filter(“ child-pages-shortcode-stylesheet”,“ my_style”);    

      function my_style($url) {        

      函数my_style($ url){        

      return 'http://example.com/path/to/style.css';    

      返回'http://example.com/path/to/style.css';    

      }

      }

      ?>

      ?>

      Default Template

      默认模板

          

        
          

              

              

      %post_thumb%
              

      %post_thumb%         

                  

                  

      %post_title%

                  

      %post_title%             

      %post_excerpt%
              

      %post_excerpt%        

          

          

      Template valiables

      模板变量

        • %post_id% – ID of the Page
        • %post_id%–页面ID

        • %width% – Width of block for single page
        • %width%–单页的块宽

        • %post_url% – Page permalink
        • %post_url%–页面永久链接

        • %post_thumb% – for Post thubmail
        • %post_thumb%–用于张贴thubmail

        • %post_title% – Page title
        • %post_title%–页面标题

        • %post_excerpt% – Page excerpt
        • %post_excerpt%–页面摘录

        Support

        支持

          • http://wpist.me/wp/child-pages-shortcode/ (en)
          • http://wpist.me/wp/child-pages-shortcode/(en)

          • http://firegoby.theta.ne.jp/wp/child-pages-shortcode (ja)
          • http://firegoby.theta.ne.jp/wp/child-pages-shortcode(ja)

          Contributors

          参与者

            Credits

            积分

            This plug-in is not guaranteed though the user of WordPress can freely use this plug-in free of charge regardless of the purpose.

            尽管WordPress的用户可以免费使用该插件,但无论目的如何,都不能保证该插件。

            The author must acknowledge the thing that the operation guarantee and the support in this plug-in use are not done at all beforehand.

            作者必须承认事先没有完成此插件使用中的操作保证和支持。

            Contact

            联系

安装步骤

    • A plug-in installation screen is displayed on the WordPress admin panel.
    • WordPress管理面板上会显示一个插件安装屏幕。

    • It installs it in wp-content/plugins.
    • 它将其安装在 wp-content / plugins 中。

    • The plug-in is made effective.
    • 该插件生效。

下载地址
https://downloads.wordpress.org/plugin/child-pages-shortcode.1.9.3.zip
-EOF-

AI助手支持GPT4.0