These are the steps to set up your blog so you can set the featured image with Blogsy.
- You only need to do this if you are using Wordpress versions 3.1 through 3.3.1.
- If you are running WordPress 3.4 or later Blogsy will auto detect that and you will be able to set the featured image without needing to make any changes to your php files.
- If you are running an older version of WordPress you cannot set the featured image.
- You need a FTP program to do this. There are many free FTP programs out there.
- Use the FTP program to get onto your server. You need to find the following files.
- class-wp-xmlrpc-server.php
- meta.php
So the directory to the files should be something like the following - YourWordPressFolder/wp-includes/ - Download a copy of both of those files to your computer.
- Make backup copies of those files before you make any changes to them.
- Open the class-wp-xmlrpc-server.php file with a basic text editor (TextEdit on Mac, NotePad on Windows) or a program designed to edit php files.
- Find the following portion of code in that file.
- Change it to the following. Be very careful as even one missing comma can cause a problem. Notice that the only change is the last line of information.
- Next, find this line in the file.
- Change it to this. Yes, change the single line of code shown above to these 7 lines of code.
- Save the file.
- Open the meta.php file with a basic text editor.
- Find the following lines of code.
- Change the code to the following.
- Save the file.
- Use the FTP program to upload and replace the files on your server. The file names have to be the same as the original files you downloaded.
$attachment_struct = array( 'date_created_gmt' => new IXR_Date($attachment_date_gmt), 'parent' => $attachment->post_parent, 'link' => $link, 'thumbnail' => $thumbnail_link, 'title' => $attachment->post_title, 'caption' => $attachment->post_excerpt, 'description' => $attachment->post_content, 'metadata' => wp_get_attachment_metadata($attachment->ID), );
$attachment_struct = array( 'date_created_gmt' => new IXR_Date($attachment_date_gmt), 'parent' => $attachment->post_parent, 'link' => $link, 'thumbnail' => $thumbnail_link, 'title' => $attachment->post_title, 'caption' => $attachment->post_excerpt, 'description' => $attachment->post_content, 'metadata' => wp_get_attachment_metadata($attachment->ID), 'id' => $attachment->ID, );
return apply_filters( 'wp_handle_upload', array( 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ), 'upload' );
$struct = array( 'id' => strval( $id ), 'file' => $name, 'url' => $upload[ 'url' ], 'type' => $type ); return apply_filters( 'wp_handle_upload', $struct, 'upload' );
function is_protected_meta( $meta_key, $meta_type = null ) {
$protected = ( '_' == $meta_key[0] );
return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}
function is_protected_meta( $meta_key, $meta_type = null ) {
if($meta_key == '_thumbnail_id'){
$protected=false;
}else{
$protected = ( '_' == $meta_key[0] );
}
return apply_filters( 'is_protected_meta', $protected, $meta_key, $meta_type );
}
We have tested this with that latest version of WordPress (Version 3.3.1) and Foghorn 0.3 by Devin Price. If you are having trouble getting it to work recheck your file changes and also test with WordPress 3.3.1 using the Foghorn 0.3 theme.
Now you can set the Featured Image for you blog with Blogsy. Enjoy!