Twenty Ten
Featured image not working in multisite installation (3 posts)

  1. GeraldS
    Posted 2 years ago #

    I am unable to create tickets in the themes trac, so I'll post it here: In a multisite installation the featured image of a post or page doesn't work.

    Steps to reproduce:

    1. Install WordPress
    2. Download the TwentyTen theme
    3. Post a new page or post on the new site, set a featured image
    4. The featured image works
    5. Create a multisite setup
    6. Create a new site within the network admin
    7. Create another post or page with a featured image in the new site
    8. The featured image doesn't show up, instead the default image is shown

    Strangely the featured image from the first post in the main site still works, but in the second site it doesn't.

  2. GeraldS
    Posted 2 years ago #

    I did some further testing:

    Line #92 in header.php looks like this:

    $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' )

    In the main blog it returns this array:
    array(4) { [0]=> string(96) "http://playground.********.de/wordpress/wp-content/uploads/2013/08/P1140625-1280x957-940x198.jpg" [1]=> int(940) [2]=> int(198) [3]=> bool(true) }

    In the second blog it returns:
    array(4) { [0]=> string(109) "http://playground.********.de/wordpress/test/wp-content/uploads/sites/2/2013/08/P1140625-1280x957-604x270.jpg" [1]=> int(442) [2]=> int(198) [3]=> bool(true) } bool(false)

    This image is too small to be used as a header image, hence the default header is used.

  3. GeraldS
    Posted 2 years ago #

    My guess would be that, when an image is set as featured image, the created thumbnail is too small to be used as a header image.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic