이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Child Pages Shortcode

설명

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

This plugin maintained on GitHub.

Some features

  • This plugin will add shortcode [child_pages] display child pages.
  • You can customize default HTML template on your plugin.
  • This plugin will be able to “excerpt” to the pages.

Example

Display child pages of the current page.
[child_pages width=”33%”]

Args

  • id – ID of page (Optional)
  • size – Post thumbnail size. e.g. ‘thumbnail’ or ‘large’
  • width – width of block for child pages.
  • disable_shortcode – Shortcode not work in the template if set true.
  • disable_excerpt_filters – filters not work for the excerpt if set true.

filter hooks example

Filter for query_posts() query.

<?php
    // default args
    $args = array(
        'post_status' => 'publish',
        'post_type' => 'page',
        'post_parent' => $id_for_the_post,
        'orderby' => 'menu_order',
        'order' => 'ASC',
        'nopaging' => true,
    );

    add_filters('child-pages-shortcode-query', "my_query");
    function my_query($args) {
        //
        // some code here
        //
        return $args;
    }
?>

Filter for default template.

<?php
    add_filter("child-pages-shortcode-template", "my_template");
    function my_template($template) {
        return '<div class="%class%"><a href="%post_url%">%post_thumb%</a></div>';
    }
?>

Filter for stylesheet URI.

<?php
    add_filter("child-pages-shortcode-stylesheet", "my_style");
    function my_style($url) {
        return 'http://example.com/path/to/style.css';
    }
?>

Default Template

<div id="child_page-%post_id%" class="child_page" style="width:%width%;">
    <div class="child_page-container">
        <div class="post_thumb"><a href="%post_url%">%post_thumb%</a></div>
        <div class="post_content">
            <h4><a href="%post_url%">%post_title%</a></h4>
            <div class="post_excerpt">%post_excerpt%</div>
        </div>
    </div>
</div>

Template valiables

  • %post_id% – ID of the Page
  • %width% – Width of block for single page
  • %post_url% – Page permalink
  • %post_thumb% – for Post thubmail
  • %post_title% – Page title
  • %post_excerpt% – Page excerpt

Support

  • http://wpist.me/wp/child-pages-shortcode/ (en)
  • 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.
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.
  • It installs it in wp-content/plugins.
  • The plug-in is made effective.

FAQ

Installation Instructions
  • A plug-in installation screen is displayed on the WordPress admin panel.
  • It installs it in wp-content/plugins.
  • The plug-in is made effective.

후기

2021년 10월 5일
Just for anyone else encountering problems, this plugin outputs php errors in php 7.4 and above
모든 20 평가 읽기

기여자 & 개발자

“Child Pages Shortcode”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Child Pages Shortcode”(이)가 5(으)로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Child Pages Shortcode”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.9.3

  • Tested on WordPress 4.2.

1.9.2

  • Tested on WordPress 4.1.

1.9.1

  • bug fix – js not found

1.9.0

  • bug fix – css syntax error

1.7.0

  • bug fix – missing wp_reset_postdata()

1.6.0

  • 버그 수정

1.3.0

  • setup_postdata() added.

1.2.0

  • 버그 수정

1.1.4

  • bug fix on non-responsive theme

1.1.3

  • Bug fix

1.1.2

  • Bug fix

1.0.1

  • Add filter hook “child-pages-shortcode-output”

0.9.0

  • Add filter hook “child-pages-shortcode-query”
  • Load stylesheet by wp_enqueue_style()

0.8.0

  • Add style “max-width:100%”.

0.4.0

  • add add_post_type_support("page", "excerpt");

0.3.0

  • Adapt to no-image.

0.1.0

  • The first release.