WordPress Plugin WP Sub Post

WP Sub Post is a wordpress plugin that allow you to make your wordpress post has a parent or child post.

Notes:

  • Child post is a real post that has a parent.
  • Child post only displayed on it’s parent post page or when parent page is displayed.
  • Child post can not be viewed individually.
  • Child post has all possibility like a normal post, such as attachment, custom fields etc.

Features:

  • Add/edit parent post directly from your post area.
  • No need to edit theme file.

Limitations:

  • No setting page
  • I don’t know about it’s compatibility.

Bugs:

  • Not compatible with my syntax highlight plugin :D

Screenshot

Plugin page:

WP sub post

New/Edit post page:

Wp sub post

View Single Post:

Wp sub post

RSS:

Wp sub post


Code:

Here is the code of this plugins…  Hahaha.. little bit messy

WP Sub Post

WP Sub Post

[raw]<pre><?php
/*
Plugin Name: WP Sub Post
Plugin URI: http://wordpress.org/#
Description: You can make a post is a child of another post.
Author: Takien
Version: 0.1 Alpha
Author URI: http://takien.com
*/

////////////////////////////

class Walker_PostDropdown extends Walker {

    var 
$tree_type 'post';

    var 
$db_fields = array ('parent' => 'post_parent''id' => 'ID');

    function 
start_el(&$output$page$depth$args) {
        
$pad str_repeat(' '$depth 3);

        
$output .= "\tID\"";
        if ( 
$page->ID == $args['selected'] )
            
$output .= ' selected="selected"';
        
$output .= '>';
        
$title esc_html($page->post_title);
        
$output .= "$pad$title";
        
$output .= "\n";
    }
}
/////////////
function &wp_get_posts($args '') {
    global 
$wpdb;

    
$defaults = array(
        
'child_of' => 0'sort_order' => 'ASC',
        
'sort_column' => 'post_title''hierarchical' => 1,
        
'exclude' => '''include' => '',
        
'meta_key' => '''meta_value' => '',
        
'authors' => '''parent' => -1'exclude_tree' => '',
        
'number' => '''offset' => 0
    
);

    
$r wp_parse_args$args$defaults );
    
extract$rEXTR_SKIP );
    
$number = (int) $number;
    
$offset = (int) $offset;

    
$cache = array();
    
$key md5serializecompact(array_keys($defaults)) ) );
    if ( 
$cache wp_cache_get'wp_get_posts''posts' ) ) {
        if ( 
is_array($cache) && isset( $cache$key ] ) ) {
            
$pages apply_filters('wp_get_posts'$cache$key ], $r );
            return 
$pages;
        }
    }

    if ( !
is_array($cache) )
        
$cache = array();

    
$inclusions '';
    if ( !empty(
$include) ) {
        
$child_of 0//ignore child_of, parent, exclude, meta_key, and meta_value params if using include
        
$parent = -1;
        
$exclude '';
        
$meta_key '';
        
$meta_value '';
        
$hierarchical false;
        
$incpages preg_split('/[\s,]+/',$include);
        if ( 
count($incpages) ) {
            foreach ( 
$incpages as $incpage ) {
                if (empty(
$inclusions))
                    
$inclusions $wpdb->prepare(' AND ( ID = %d '$incpage);
                else
                    
$inclusions .= $wpdb->prepare(' OR ID = %d '$incpage);
            }
        }
    }
    if (!empty(
$inclusions))
        
$inclusions .= ')';

    
$exclusions '';
    if ( !empty(
$exclude) ) {
        
$expages preg_split('/[\s,]+/',$exclude);
        if ( 
count($expages) ) {
            foreach ( 
$expages as $expage ) {
                if (empty(
$exclusions))
                    
$exclusions $wpdb->prepare(' AND ( ID <> %d '$expage);
                else
                    
$exclusions .= $wpdb->prepare(' AND ID <> %d '$expage);
            }
        }
    }
    if (!empty(
$exclusions))
        
$exclusions .= ')';

    
$author_query '';
    if (!empty(
$authors)) {
        
$post_authors preg_split('/[\s,]+/',$authors);

        if ( 
count($post_authors) ) {
            foreach ( 
$post_authors as $post_author ) {
                
//Do we have an author id or an author login?
                
if ( == intval($post_author) ) {
                    
$post_author get_userdatabylogin($post_author);
                    if ( empty(
$post_author) )
                        continue;
                    if ( empty(
$post_author->ID) )
                        continue;
                    
$post_author $post_author->ID;
                }

                if ( 
'' == $author_query )
                    
$author_query $wpdb->prepare(' post_author = %d '$post_author);
                else
                    
$author_query .= $wpdb->prepare(' OR post_author = %d '$post_author);
            }
            if ( 
'' != $author_query )
                
$author_query " AND ($author_query)";
        }
    }

    
$join '';
    
$where "$exclusions $inclusions ";
    if ( ! empty( 
$meta_key ) || ! empty( $meta_value ) ) {
        
$join " LEFT JOIN $wpdb->postmeta ON ( $wpdb->posts.ID = $wpdb->postmeta.post_id )";

        
// meta_key and meta_value might be slashed
        
$meta_key stripslashes($meta_key);
        
$meta_value stripslashes($meta_value);
        if ( ! empty( 
$meta_key ) )
            
$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_key = %s"$meta_key);
        if ( ! empty( 
$meta_value ) )
            
$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s"$meta_value);

    }

    if ( 
$parent >= )
        
$where .= $wpdb->prepare(' AND post_parent = %d '$parent);

    
$query "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'post' AND post_status = 'publish') $where ";
    
$query .= $author_query;
    
$query .= " ORDER BY " $sort_column " " $sort_order ;

    if ( !empty(
$number) )
        
$query .= ' LIMIT ' $offset ',' $number;

    
$pages $wpdb->get_results($query);

    if ( empty(
$pages) ) {
        
$pages apply_filters('wp_get_posts', array(), $r);
        return 
$pages;
    }

    
// Sanitize before caching so it'll only get done once
    
$num_pages count($pages);
    for (
$i 0$i $num_pages$i++) {
        
$pages[$i] = sanitize_post($pages[$i], 'raw');
    }

    
// Update cache.
    
update_page_cache($pages);

    if ( 
$child_of || $hierarchical )
        
$pages = & get_page_children($child_of$pages);

    if ( !empty(
$exclude_tree) ) {
        
$exclude = (int) $exclude_tree;
        
$children get_page_children($exclude$pages);
        
$excludes = array();
        foreach ( 
$children as $child )
            
$excludes[] = $child->ID;
        
$excludes[] = $exclude;
        
$num_pages count($pages);
        for ( 
$i 0$i $num_pages$i++ ) {
            if ( 
in_array($pages[$i]->ID$excludes) )
                unset(
$pages[$i]);
        }
    }

    
$cache$key ] = $pages;
    
wp_cache_set'wp_get_posts'$cache'posts' );

    
$pages apply_filters('wp_get_posts'$pages$r);

    return 
$pages;
}
//////////////

function walk_post_dropdown_tree() {
    
$args func_get_args();
    if ( empty(
$args[2]['walker']) ) // the user's options are the third parameter
        
$walker = new Walker_PostDropdown;
    else
        
$walker $args[2]['walker'];

    return 
call_user_func_array(array(&$walker'walk'), $args);
}

function 
wp_dropdown_posts($args '') {
    
$defaults = array(
        
'depth' => 0'child_of' => 0,
        
'selected' => 0'echo' => 1,
        
'name' => 'page_id''show_option_none' => '''show_option_no_change' => '',
        
'option_none_value' => ''
    
);

    
$r wp_parse_args$args$defaults );
    
extract$rEXTR_SKIP );

    
$pages wp_get_posts($r);
    
$output '';
    
$name esc_attr($name);

    if ( ! empty(
$pages) ) {
        
$output "
<select id=""$name\"" 
name="\"$name\"">
<
option value="\"-1\"">$show_option_no_change</option>
<
option value="\""">$show_option_none</option>

\n"
;
    }

    
$output apply_filters('wp_dropdown_pages'$output);

    if ( 
$echo )
        echo 
$output;

    return 
$output;
}
/////////////////////////////

/* Use the admin_menu action to define the custom boxes */
add_action('admin_menu''myplugin_add_custom_box');

/* Use the save_post action to do something with the data entered */
add_action('save_post''myplugin_save_postdata');

/* Adds a custom section to the "advanced" Post and Page edit screens */
function myplugin_add_custom_box() {

  if( 
function_exists'add_meta_box' )) {
    
add_meta_box'myplugin_sectionid'__'WP Sub Posts''myplugin_textdomain' ), 'myplugin_inner_custom_box''post''side','high' );
    
//add_meta_box( $id,                  $title,                                      $callback,                  $page, $context, $priority );
    
add_meta_box'myplugin_sectionid'__'WP Sub Posts''myplugin_textdomain' ), 'myplugin_inner_custom_box''page''advanced' );
   } else {
    
add_action('dbx_post_advanced''myplugin_old_custom_box' );
    
add_action('dbx_page_advanced''myplugin_old_custom_box' );
  }
}

function 
myplugin_inner_custom_box() {
echo 
'
<style type="text/css">
select#parent_id, select#parent_id option {
    width:250px;
}
</style>

'
;

echo 
'
<input id="myplugin_noncename" name="myplugin_noncename" type="hidden" value="' 
.
    
wp_create_nonceplugin_basename(__FILE__) ) . '" />';  ?>
<h5><?php _e('Parent'?></h5>

<label for="post_parent">Please select the parent of this post</label>

<?php 

$currentid 
$_GET['post'];
wp_dropdown_posts(array('exclude_tree'             => $currentid,
                            
'selected'             => $post->post_parent,
                            
'name'                 => 'parent_id',
                            
'show_option_none'     => __('Main Post (no parent)'),
                            
'sort_column'        => 'menu_order, post_title'));
 }

/* Prints the edit form for pre-WordPress 2.5 post/page */
function myplugin_old_custom_box() {

  echo 
'
<div class="dbx-b-ox-wrapper">' 
"\n";
  echo 
'
<fieldset id="myplugin_fieldsetid" class="dbx-box">' 
"\n";
  echo 
'
<div class="dbx-h-andle-wrapper">
<h3 class="dbx-handle">' 
.
        
__'WP Sub Posts''myplugin_textdomain' ) . "</h3>
</div>

"
;   

  echo 
'
<div class="dbx-c-ontent-wrapper">
<div class="dbx-content">'
;

  
// output editing form

  
myplugin_inner_custom_box();

  
// end wrapper

  
echo "</div>
</div>
</fieldset>
</div>

\n"
;
}

/* When the post is saved, saves our custom data */
function myplugin_save_postdata$post_id ) {

  
// verify this came from the our screen and with proper authorization,
  // because save_post can be triggered at other times

  
if ( !wp_verify_nonce$_POST['myplugin_noncename'], plugin_basename(__FILE__) )) {
    return 
$post_id;
  }

  
// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want
  // to do anything
  
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
    return 
$post_id;

  
// Check permissions
  
if ( 'page' == $_POST['post_type'] ) {
    if ( !
current_user_can'edit_page'$post_id ) )
      return 
$post_id;
  } else {
    if ( !
current_user_can'edit_post'$post_id ) )
      return 
$post_id;
  }

  
// OK, we're authenticated: we need to find and save the data

  
$mydata $_POST['parent_id'];

   return 
$mydata;
}

add_filter('posts_where','where_no_parent');
add_filter ('the_content','subpost_template'1);

function 
subpost_template($content) {

    if(
is_singular) {
    
remove_filter('posts_where','where_no_parent');
    }
    echo 
$content;

    
$idnya get_the_ID();
    
$child = new WP_Query("post_type=post&post_parent=".$idnya."");

    while(
$child->have_posts()) : $child->the_post();
    echo 
'
<blockquote>

'
;
    echo 
'
<h3>'
;
    
the_title();

    echo 
'</h3>

'
;
    
$childid =  get_the_ID();
    
the_content();

    
edit_post_link('Edit','','',$childid);
    echo 
'</blockquote>

'
;

    endwhile;
    
wp_reset_query();
}

function 
where_no_parent($where) {
    global 
$wpdb;
     
$where .= " AND post_parent  = 0";
     return 
$where;
}
?>[/raw]
Revision by polvocdo

subpost_template()

subpost_template()

[raw]</pre>
<pre>function subpost_template($content) {

    if(is_singular()) {
        remove_filter('posts_where','where_no_parent');
    }

    $parentID = get_the_ID();
       $childposts = get_posts(array(
                                'post_type' => 'post',
                                'numberposts' => -1,
                                'post_status' => 'publish',
                                'post_parent' => $parentID
                                ));
      $subcontent = "";
    foreach($childposts as $childpost){
        $subcontent .= "
<blockquote>

";
        $subcontent .= "
<h3>".$childpost->post_title."</h3>

";
        $subcontent .= $childpost->post_content;
        $subcontent .= '

<a rel="nofollow" href="'.get_edit_post_link($childpost->ID).'">Edit</a>

';
        $subcontent .= "</blockquote>

";
    }

    $content .= $subcontent;

    return $content;
}
</pre>
<p>[/raw]

WP Dropdown Post

wp_dropdown_posts()

[raw]</p>
<pre>global $post;
$currentid = $_GET['post'];
wp_dropdown_posts(array('exclude_tree'             => $currentid,
                            'selected'             => $post->post_parent,
                            'name'                 => 'parent_id',
                            'show_option_none'     => __('Main Post (no parent)'),
                            'sort_column'        => 'menu_order, post_title'));
</pre>
<p>[/raw]
Download
You can download alpha version of this plugin here http://cektkp.com/wpsubpost
If it not working please Click here
Warning

This plugin is Alpha version, use it for testing purpose only. Any problem caused by this plugin is not my responsibility.

Demo:

See below:

Code Update WP Sub Post

There are some changes to the WP Sub Post:

  • Fixed/Added, now child post can be viewed as a single post, with link to the Parent Post instead of displaying blank post with ‘Post not found’ title.
  • Added, CSS class and id to the blockquote of the child post. It would be useful to make a link like http://example.com/parentpost.html#childpostXXX. while XXX is your child post ID.

Two functions that are changed subpost_template() and where_no_parent()

WP Sub Post

[raw]<pre>
function subpost_template($content) {
global $post;

$parentID = get_the_ID();
       $childposts = get_posts(array(
                                'post_type' => 'post',
                                'numberposts' => -1,
                                'post_status' => 'publish',
                                'post_parent' => $parentID
                                ));
      $subcontent = "";
    foreach($childposts as $childpost){
        $subcontent .= "
<blockquote class=\"sub_post\" id=\"subpost_".$childpost->ID."\">";
        $subcontent .= "
<h3>".$childpost->post_title."</h3>

";
        $subcontent .= $childpost->post_content;
        $subcontent .= '
<p class="postmetadata"><small>This sub post was added on: '.date('l, dS F, Y',strtotime($childpost->post_date)).' <a href="'.get_edit_post_link($childpost->ID).'" rel="nofollow">Edit</a></small>

';
        $subcontent .= "</blockquote>

";
    }

        if($post->post_parent !== 0) {

        $parent_info = '
<blockquote>This post is a child post of <strong>'.get_the_title($post->post_parent).'</strong>. To view the parent post, please <a href="'.get_permalink($post->post_parent).'">click here.</a></blockquote>

';
        $content = $parent_info.$content;
        }

    $content .= $subcontent;
    return $content;
}

function where_no_parent($where) {
    global $wpdb;
    if(!is_single()) {
     $where .= " AND post_parent  = 0";
    }
    else {
    $where .= " AND post_type = 'post'";
    }
    return $where;
}
</pre>
<p>[/raw]

Finally you can see the demo here

Yesterday, I was failed to add a demo directly in this site because of incompatibility with smart tags (all smart tags are not working when WP Sub Post is activated).

The problem comes from my old stupid function subpost_template():D

Thanks and sorry to polvocdo :) , actually your revision is the answer.
Ha ha I’m forget to replace mine with your revision  :hammer: ….


This is a child post

This is an individual post (http://takien.com/536/this-is-a-child-post.php) that attached to the another post ( http://takien.com/550/wordpress-plugin-wp-sub-post.php)

image on the child post

Child post could be useful when you want to add an additional information to the main post,  news analysis, or update. Instead of editing the main post, you can now simply Add New post and mark it as child post.

Child post also has it’s own functionality, can handle attachment, displaying image. etc.

But you can’t see this post in the post editing page (wp-admin/edit.php) because of filter  in the plugin to prevent child post to be displayed individually in the main page, post listing, feed, etc.  Hahaha.. don’t worry, I will fix it soon.

$10.99 .CO Domains!

Incoming search terms:

  • wp_dropdown_posts
  • wordpress sub posts
  • wordpress sub post
  • sub post wordpress
  • changuitos
  • wp_dropdown_post
  • wordpress subposts
  • WP Sub Posts
  • wordpress post parent plugin
  • sub posts wordpress
  • http://blogs.endonesiahost.com aagun2006

    bagus bang nih,cocok buat situs berita.

    Lanjutkan, walau sudah 100 hari berlalu …

    LAnjutkan …

  • Pingback: Nothing found for 593 Uploaded-to-wordpress-org Php

  • http://www.bakawan.com/log/ uwiuw

    wah, keren euy. ide plugin yg keren dan kalau udah stabil bakal killer. Pasti banyak yang akan butuh untuk mindahkan ke kanan dan kekiri post child mereka.

    • takien

      hehe maskasih mas uwiuw,
      mudah2an ada waktu untuk ngutak-atik lagi :)

  • bugtracker

    Child post can not be viewed individually.?? I still can see it individually. A bug maybe.

    • takien

      sorry.. the code is still confusing me.. :D

  • http://www.bakawan.com/log uwiuw

    udah di tes untuk 3.0 ?

    • takien

      udah bro, no problemo :)

  • Shelly

    This is a great idea – however, I have it installed on WordPress 3.0. When you give a post a “parent,” the post itself disappears from the list of posts (in the admin area, under “Posts>Posts”) to be edited or deleted in the future. So far, the only way I’ve found to get to a child post to be edited is to view the source code of the parent post editing screen, find the child page in the dropdown (the value is the post ID) and change the post ID in the “edit” screen to the child’s value that I found by viewing the source code.

    I’ve managed ot mess with the plugin a bit to add a secondary section in the parent page to show a list of that posts’ children, but that’s all it does. So far, I can’t get it to *ink* to the actual child page so if you select it, it’ll move to that child page’s edit screen.

    I know this is in alpha, but I thought I’d let you know.

    • Neyah

      Hi,
      have you found any solution for displaying sub posts in the admin area?

  • http://www.croatia-expert.com Morten

    I just installed the plugin on a new pages, plugin seam to work with out any problem, i although have the following questions.

    1. is there any way to awoid that pictures overlap the next sub post, this seams to happen if you dont have enoug text in the sub post. (like with your monkey picture above)

    Morten

    • takien

      Thanks Morten,
      I think your problem is only about CSS.

  • http://www.croatia-expert.com Morten

    Ok, then i will see if i can find some help solving that issue (:

    • takien

      please give me your links here

  • http://www.croatia-expert.com Morten

    Hi Takien,

    i solved it by making sure i have enought text which is ok solution for me now, i am quite happy with the result here http://www.medulin-croatia.com/apartments-accommodation-for-4-6-persons-medulin/

    One improvment could be not having to forward the subpost to the main post, the sub post occur in related post and gives a 404 if you havent redirected them.

    Morten

    • takien

      Actually i have fix this problem and updated my code.

      Please refer to my sub post above Code Update WP Sub Post

      to to make sub post redirected to the parent post,
      please edit this line

      [php]
      $parent_info = ‘

      This post is a child post of ‘.get_the_title($post->post_parent).’. To view the parent post, please post_parent).’”>click here.

      ‘;
      [/php]

      and replace with your own Redirection code (e.g. HTML redirection)

    • takien

      BTW, your site is nice :)

  • http://www.croatia-expert.com Morten

    Thanks, i will try to fix it

    Morten

  • http://www.croatia-expert.com Morten

    Takien, i discovered another bug, when i have the plugin activated like on this page http://www.pula-croatia.com/usefull-stuff/croatias-top-holiday-destinations/ the subpages gives a 404, do you know why that happens?

    Morten

    • takien

      Have you patched the code?

      • http://www.croatia-expert.com Morten

        yes i patched the code on my page http://www.medulin-croatia.com/ but the SUBPAGES still get 404, any idea how to fix?

        You mention i should replace some code with my redirection code, could you specify that with an exsample?

        Morten

    • Shelly

      I can verify this – when I activate the plugin on WordPress 3.0.1, in my backend Pages section, any subpages that I have are gone from the list. The parent page is fine, but child pages do not show at all. On the front end of the site, trying to access child pages sends me to a 404 page. I cannot query them either (to create a menu list – the query returns as empty.) If I deactivate the plugin, the child pages show up on the front end, and in the list on the back end, and I can query just fine.

    • Shelly

      If it helps, I’ve managed to find *here* the problem is, but I haven’t found a solution yet. It’s in the where_no_parent() function.

      • http://taslycenter.com mervandi

        hi, i got the same problem when trying to implement this sub post plugin..
        i could not open the sub-post directly, it returns to 404..

        any body fix this..?

        btw: really nice plugin..

        tetep semangat Bro..!!

  • http://blog.exre.org Fabian

    Hi,

    thanks a lot for the great plugin! I can confirm the same error as the posters before me.

    Independently of that, I was wondering how to change your code in order to get the following results (I’m not very firm with php or WP):

    1. The child inherits the categories (and perhaps also the title) from the parent, at least as a preset in the edit form.

    2. The output of potential parents in the drop down menu is limited to top-level parents (i.e., all without parents themselves), or to some other level.

    Any suggestions?

    Thanks!

    Fabian

  • Marina

    Wow, very nice work..
    I’ve installed it and it’s working smoothly (haven’t found any bug).

    But just a question:
    I’ve chosen a category for a child post, but somehow when I clicked the category from the homepage, the child post isn’t there on the list of posts of that category. Do you know how to solve this problem?

    Thanks a lot!
    Keep up the good work

    M

    • takien

      the idea of this plugin is not as you expected.
      of course it can’t be viewed on it’s own category because there’s no parents there. but if you want to do, just look at where_no_parent functions, and edit as you need.

      as this plugin is still experimental, all your comments are very appreciated for the future stable release.

  • Marina

    Another thing is that I hope to have the actual child post on the bottom, and the older child post on top of it…. Do you know how to change this?

    • takien

      You want to reorder the child post? yes you can.

      Go to this this code.
      [php]
      $childposts = get_posts(array(
      ‘post_type’ => ‘post’,
      ‘numberposts’ => -1,
      ‘post_status’ => ‘publish’,
      ‘post_parent’ => $parentID
      ));[/php]

      then add order parameter, like this:
      [php]
      $childposts = get_posts(array(
      ‘post_type’ => ‘post’,
      ‘numberposts’ => -1,
      ‘post_status’ => ‘publish’,
      ‘orderby’ => ‘post_date’,
      ‘order’ => ‘ASC’,
      ‘post_parent’ => $parentID
      ));[/php]
      [/php]

      • Marina

        Oh.. wonderful!!

        I edit it as you wrote and it works perfectly! :)
        It’s really a superb plugin.

        By the way, since i’m really a beginner in php (or lets say, dont know anything about it), do you know what to paste in the where_no_parent post for category? since every child post has its own URL, it should all generally possible isn’t it?

        Thank you very much again!!

  • tom

    Hi, i installed the plugin and it works great, except the fact that its harder to edit your sub posts and they dont show up in the admin panel … …. i really like how morten styled his subposts and was wondering if you can tell me how to style …… i have no php background so i cant really find where to insert the style codes (background color, border, etc) in this plugin

    also, how can you make the title of the subpost a link to the subpost (so you can view it individually)

    Thanks

    • takien

      Hello tom,
      thank you for using my plugin and give a feedback.
      I’m so sorry I’m not have much time to maintenance this plugin, I’m not promising but i will try keep the plugin is useful to everyone.

  • http://downloads.modgame.com.br Arnon Rodrigues

    Hello, isn’t it possible to make posts like this:

    http://www.example.com/post/subpost

    In this case, the subpost can be viewed like a singular post, changing only the url.

    Thanks a lot!

    ;)

    • takien

      I don’t think that is possible because i did not explore the wordpress rewrite function yet. thank you

  • Pingback: Rewriting the WP Sub Posts plugin to allow one custom post type to be a child of another custom post type | SeekPHP.com

  • Pearl

    I can’t seem to install this. Is there any update to this?

    • Anonymous

      sorry there’s currently no update for this plugins.
      btw is there any error message or something break/ blank etc?
      thanks.

      • Pearl

        Managed to upload it manually. Thanks. 

      • Pearl

        May I know what’s the block quote class for the sub-post? 

        • Anonymous

          it has class .sub_post

          • Pearl

            Thank you. I really do appreciate this plugin. Can I also ask if it is possible to put a user photo per post or custom fields per post?

      • Pearl

        Okay. I figured the last one out. Query again: Is it possible to include the user/author in the child post and put the user’s photo with it? 

        • Anonymous

          try this to retrieve user/author avatar.
          [php]
          echo get_avatar( get_the_author_meta(‘user_email’), 80 );
          [/php]

          • Pearl

            where shall i put the echo get_avatar ?

          • Anonymous

            See my next comment

          • Pearl

            I’m confused now. because when i placed it in side the code it just got the avatar of the parent author and not the child author. it was also above the “block quoted sub post.” i wanted it to be inside the block quote post and the sub post user author’s photo.

          • Anonymous
        • Anonymous

          To do, you must edit the plugins at this line:
          [php]
          $content = $parent_info.$content;
          [/php]

          should be replaced with:

          [php]
          $avatar = ”;
          $content = $parent_info.$content.$avatar;
          [/php]

          reference about the_author_meta can be found here:
          http://codex.wordpress.org/Template_Tags/the_author_meta

          • Pearl

            Hi, Yes. I read this. But it doesn’t seem to work still. I replaced it already. Really sorry for the hassle. I appreciate the support.

          • Anonymous

            After discovering the documentation of get_the_author_meta, it seems to pass the child author ID, otherwise it shows the info of the current loop (parent post)

            Worth to try:

            [php]
            $avatar = ‘
            post_author), 80 ).’”>’;
            $content = $parent_info.$content.$avatar;
            [/php]

            No problem, I’m glad I could help :)

            Oops, replace & gt; with > ( ‘greater than’ sign)

          • Pearl

            Where will I put this: try this to retrieve user/author avatar.
            [php]
            echo get_avatar( get_the_author_meta(‘user_email’), 80 );
            [/php] ?

          • Anonymous

            this one shouldn’t be used

          • Pearl

            Does that mean it will look like: get_the_author_meta(‘user_email’,$post->;post_author), 80 ).’”>’;

          • Pearl

            Sigh. It’s still not working. :(