Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks to Rinat for this Plugin!
    And thx also to you, Guy! Moving “do_action( ‘fu_after_create_post’, $post_id )” into _handle_result worked for me, too (from line 325 to 424 in v 0.5.9.2)

    This code in functions.php just makes the first uploaded image the post thumbnail:

    add_action( 'fu_after_create_post', 'fu_attach_thumbnail' );
    function fu_attach_thumbnail( $post_id ) {
    	$args = array(
    	'post_type' => 'attachment',
    	'post_mime_type' => 'image',
    	'post_parent' => $post_id
    	);
    	$images = get_posts( $args );
    	if($images) {
    		$image=array_shift($images);
    		set_post_thumbnail( $post_id, $image->ID );
    	}
    	foreach($images as $image):
    	 // do something with the other attached images...
    	endforeach;
    }

    The other uploaded images could become a gallery or so…?

    I have exactly the same problem. Is there no solution so far?
    Error message:
    Fatal error: Call to undefined function add_meta_box() in /www/htdocs/w00cccaf/wordpress/wp-content/themes/twentyten/functions.php on line 584

Viewing 2 replies - 1 through 2 (of 2 total)