Changeset 855337
- Timestamp:
- 02/11/2014 05:19:56 AM (12 years ago)
- File:
-
- 1 edited
-
add-sub-posts/tags/2.0.1/inital.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
add-sub-posts/tags/2.0.1/inital.php
r855335 r855337 2 2 /** 3 3 * Plugin Name: Add sub posts 4 * Description: You can add post with sub posts under the category.In single.php $args = array( 'posts_per_page' => 5, 'post_parent' => get_the_ID(), 'post_type'=>'tabs_children'); 5 6 $myposts = get_posts( $args ); 7 foreach ( $myposts as $post ) : setup_postdata( $post ); ?> 8 9 <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> 10 11 <?php endforeach; 12 wp_reset_postdata();?> 4 * Description: You can add post with sub posts under the category.In single.php $args = array( 'posts_per_page' => 5, 'post_parent' => get_the_ID(), 'post_type'=>'tabs_children'); $myposts = get_posts( $args );foreach ( $myposts as $post ) : setup_postdata( $post ); 13 5 * Author: M.Saju 14 6 * Version: 2.0.1
Note: See TracChangeset
for help on using the changeset viewer.