Zidalgo Wordpress Forums | The function has been deprecated

You must be logged in to post Login Register

Search Forums:


 






The function has been deprecated

UserPost

3:04 pm
March 10, 2009


mstibbe

New Member

posts 2

1

On my blog, http://www.golfhotelwhiskey.com, I use the small, square posts on the main page to display little airport reviews from one of my categories. It used to work fine and the maps of each airport appeared in the excerpt. Now, since upgrading WP, I just get the error message:


"The function has been deprecated. You need to update your template file calls to get_the_image()."


Is there a way to make this work again or, if not, at least remove the error message?


Matthew

9:01 pm
March 10, 2009


admin

Admin

posts 173

2

Sure is, I can take care of this for you, or follow the solution outlined below.


1) Open your index.php template file

2) Locate the line that says

<?php echo get_the_image_link(array('Thumbnail','My Thumbnail'),'thumbnail'); ?>

 – near the bottom of the file.

3) Replace with

<?php if(function_exists('get_the_image')) { get_the_image(array('custom_key' => array('feature_img'), 'default_size' => 'thumbnail', 'width' => '75', 'height' => '75', 'image_class' => 'thumbnail')); } ?>

This should now resolve the confict with your upgrade.

9:18 pm
March 10, 2009


mstibbe

New Member

posts 2

3

Great. That fixed it. Thanks. Matthew

1:11 pm
April 4, 2010


skywolfyx1

turkey

New Member

posts 1

4

thank you i use this code