Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpb_list_child_pages() {
- global $post;
- if ( 'movie' == get_post_type() && $post->post_parent )
- $childpages = wp_list_pages( 'post_type=movie&sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );
- else
- $childpages = wp_list_pages( 'post_type=movie&sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );
- if ( $childpages ) {
- $string = '' . $childpages . '';
- }
- echo $string;
- }
- add_shortcode('wpb_childpages', 'wpb_list_child_pages');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement