• By removing the function simone_the_responsive_thumbnail() from the theme, any child theme using it will break with a fatal error.

    May I suggest adding a fallback option to Simone to prevent this error?

    For anyone reading this, adding this to your child theme functions.php prevents the fatal error, yet doesn’t display the image.

    if ( !function_exists( 'simone_the_responsive_thumbnail' ) ) {
    	function simone_the_responsive_thumbnail() {
    		echo '<!-- removed from parent theme -->';
    	}
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • when removing the code for simone_the_responsive_thumbnail from template-tags did you also make sure and remove the call to that function in content.php? it should be replaced by the_post_thumbnail();

    I have one site with that set up working from a child theme just fine, I do not get a fatal error.

    I have a child-of-Simone theme which now breaks on any post with a featured image (but only those – all other images display just fine):

    Fatal error: Call to undefined function simone_the_responsive_thumbnail() in C:\wamp\www\wordpress\wp-content\themes\childofsimone\content-single.php on line 15

    I am panicking a bit because my knowledge of php is practically non-existent. Is there a dumbed-down explanation of how to fix this? I know how to access the files and could edit if I knew exactly what to add/remove and where…! (The site is only in local development at this point, happily.)

    OK, it turns out that without actually understanding what I was doing, I followed Al_Photog’s instructions (also changing the content-single.php), and I got the posts to display with the featured image. Someday I hope to understand all this, but in the meantime, thanks so much for posting that! Now if could somehow get the featured image to link to the attachment page…!

    +1 to this request. Is there any better fix that doesn’t cause no image to load at all?

    I’ve downgraded back to v2.0.3 until I can find a better fix for this.

    Nevermind. I just looked at the updated code for Simone and it looks like they just dropped simone_the_responsive_thumbnail() in favor of WordPress’ built-in function the_post_thumbnail(), so I made the same change in my child theme and now everything looks great.

    Thread Starter jeroensmeets

    (@jeroensmeets)

    I can’t edit my first post of this thread, and the code I wrote there only prevents the error, yet it doesn’t display the image. So if you have this error: check all files in your child theme for

    simone_the_responsive_thumbnail()

    and replace it with

    the_post_thumbnail()

    If this doesn’t fix the problem, you can add this to the functions.php file in your child theme:

    if ( !function_exists( 'simone_the_responsive_thumbnail' ) ) {
    	function simone_the_responsive_thumbnail() {
    		the_post_thumbnail();
    	}
    }

    For clarity, the original simone_the_responsive_thumbnail() function was added before WordPress had RICG Responsive Images in core. When that was shipped, the function was removed to prevent a doubling up of functionality.

    The solution suggested here is sound. If someone submits a pull request to the repo, I’ll add it in so you get credit. https://github.com/mor10/simone

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘function simone_the_responsive_thumbnail() removed’ is closed to new replies.