SB Child List
How to use it with custom post types? (2 posts)

  1. pinktank
    Posted 3 years ago #

    How do we use this with custom post types that are hierarchical? It seems to work only with pages. Thanks!


  2. pinktank
    Posted 3 years ago #

    Solved it by editing the following with my plugin (though now it is being hijacked on the main page by my function that shows custom types on the main page loop, not sure how to fix this)

    I would suggest adding an option to sb child list settings to make it any, or to use a list of specific post types. I would have committed that code here but I am no good at editing plugin settings.

    Thanks a bunch!

    Line 294

    $sql = 'SELECT ID, post_title, post_type
    			FROM ' . $wpdb->posts . '
    				post_status = \'publish\'
    				AND post_parent = ' . $id . '
    				AND post_type = \'<strong>dergiden</strong>\'
    			ORDER BY ' . $order;
    	if ($children = $wpdb->get_results($sql)) {
    		$return .= $template_start;
    		foreach ($children as $i=>$child) {
    			if ($child->post_type == '<strong>dergiden</strong>') {


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • SB Child List
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.