matthieubrunet / child-pages-shortcode Goto Github PK
View Code? Open in Web Editor NEWThis project forked from miya0001/child-pages-shortcode
Fork of child-pages-shortcode to add several options
This project forked from miya0001/child-pages-shortcode
Fork of child-pages-shortcode to add several options
=== Child Pages Shortcode === Contributors: miyauchi - forked by Matthieu Brunet Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FR7RD5SGEU69Y Tags: shortcode Requires at least: 3.4 Tested up to: 3.7 Stable tag: 1.0.0 You can use shortcode for display child pages from the page. == Description == You can use shortcode for display child pages from the page. [This plugin maintained on GitHub.](https://github.com/miya0001/child-pages-shortcode) = 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. The fork add the following features : * class parameter to specify the main div class * template_file to specify a particular template file * new %post_content% replacement tag to display the full content instead of the excerpt * add the childPages function to be used as the template tag = Example = Display child pages of the current page. `[child_pages width="33%"]` Template tag : childPages(array("id"=>3, "size"=>"25%", "width"=>"thumbs", "class"=>"my-child-page-class", "template_file"=>"my_template_file.php"); = 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. * class - specify the class of the parent div * template_file - specify a template file located in the theme directory = 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 variables * %post_id% - ID of the Page * %width% - Width of block for single page * %post_url% - Page permalink * %post_thumb% - <img> for Post thubmail * %post_title% - Page title * %post_excerpt% - Page excerpt * %post_content% - Page content = Contributors = * [Takayuki Miyauchi](http://wpist.me/) * [Matthieu Brunet](http://www.brunet.fr) == Installation == * 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. == Changelog == 1.0.0 first version of the fork
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.