WordPress.org

Support

Support » Plugins and Hacks » SB Child List » How to use it with custom post types?

How to use it with custom post types?

Viewing 1 replies (of 1 total)
  • 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 . '
    			WHERE
    				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>') {

    Line306

Viewing 1 replies (of 1 total)
  • The topic ‘How to use it with custom post types?’ is closed to new replies.
Skip to toolbar