• Resolved sophia_o

    (@sophia_o)


    Hi!

    Great plugin!

    It works nicely except the fact that there are multiple “set as…” links displayed in the backend image uploader (in my case 4 for each additional image). Same problem was also already reported two years ago and solved by releasing a new version. Is anybody else having the same problem? I have no idea what the reason could be…

    I added this code to the functions.php in the Atahualpa theme:

    //Multiple Featured Images for various Post Types:
    
    if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
    
    	// Since 3.4.5: WP 2.9 thumbnails support:
    	add_theme_support( 'post-thumbnails' );
    	if ($bfa_ata['post_thumbnail_crop'] == "Yes")
    		set_post_thumbnail_size( $bfa_ata['post_thumbnail_width'], $bfa_ata['post_thumbnail_height'], true );
    	else set_post_thumbnail_size( $bfa_ata['post_thumbnail_width'], $bfa_ata['post_thumbnail_height'] );
    
    add_image_size( 'single-post-thumbnail', 400, 9999 ); // Permalink thumbnail size
    add_image_size('image-thumbnail', 75, 50);
    add_image_size('image-medium', 225, 150);
    add_image_size('image-large', 450, 300);
    add_image_size('image-full', 900, 600);
    
    //Multiple Featured Images Secondary Image for various Post Types:
            if (class_exists('MultiPostThumbnails')) {
                $types = array('post', 'page', 'xyz');
                foreach($types as $type) {
                    new MultiPostThumbnails(array(
                        'label' => 'Secondary Image',
                        'id' => 'secondary-image',
                        'post_type' => $type
                        )
                    );
                }
            }
    
    //Multiple Featured Images Third Image for various Post Types:
            if (class_exists('MultiPostThumbnails')) {
                $types = array('post', 'page', 'xyz');
                foreach($types as $type) {
                    new MultiPostThumbnails(array(
                        'label' => 'Third Image',
                        'id' => 'third-image',
                        'post_type' => $type
                        )
                    );
                }
            }
    
    //Multiple Featured Images Fourth Image for various Post Types:
            if (class_exists('MultiPostThumbnails')) {
                $types = array('post', 'page', 'xyz');
                foreach($types as $type) {
                    new MultiPostThumbnails(array(
                        'label' => 'Fourth Image',
                        'id' => 'fourth-image',
                        'post_type' => $type
                        )
                    );
                }
            }
    
    //Multiple Featured Images Fifth Image for various Post Types:
            if (class_exists('MultiPostThumbnails')) {
                $types = array('post', 'page', 'xyz');
                foreach($types as $type) {
                    new MultiPostThumbnails(array(
                        'label' => 'Fifth Image',
                        'id' => 'fifth-image',
                        'post_type' => $type
                        )
                    );
                }
            }

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

    http://wordpress.org/extend/plugins/multiple-post-thumbnails/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple "Set as…"’ is closed to new replies.