i was looking into the idea of changing my theme from velvet to another theme, not necessarily a kriesi theme (much as i like them). i was experimenting, and none of my images, which are ‘set as featured images,’ appeared as i ‘previewed’ other themes. is this true? is there anything i can do about this?? that would be years of daily photos….
You can try following convert function. Backup your database first and then insert the code at the end of functions.php:
add_action( 'admin_init', 'avia_do_gallery_conversion');
$post_types = array('post','page','portfolio');
$count = 0;
//iterate over each post type
foreach($post_types as $type)
//get all posts of a certain type
$the_query = new WP_Query( array('post_type' => $type, 'posts_per_page'=>-1) );
//check if any post were retrieved
//iterate over each post and check if the post has a gallery key
foreach($the_query->posts as $entry)
//since there might be hundreds of posts make sure php doesnt time out
$post_id = $entry->ID;
$slides = avia_post_meta($post_id, 'slideshow');
$attachmend_id = $slides['slideshow_image'];
update_post_meta($post_id, '_thumbnail_id', $attachmend_id);
Afterwards go to your admin page – it will probably load very long because this code will query all posts and it will set the first slideshow image as featured image. After the conversion remove the code to avoid performance issues.
The topic ‘if i were to wish to change my theme — to the 'featured image' images follow me’ is closed to new replies.