WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Post Thumbnails
[resolved] Multiple "Set as..." (3 posts)

  1. sophia_o
    Member
    Posted 1 year ago #

    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/

  2. sophia_o
    Member
    Posted 1 year ago #

    and: only one of the four "set as..." is actually working. any idea anybody?

  3. Chris Scott
    Member
    Plugin Author

    Posted 1 year ago #

    This should be fixed in version 1.4 which was released today.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic