Template function throws up an error
-
Hi
Great plugin and working ok but I had an issue when the featured imaged appeared twice and that was because of the template file. I removed the featured image code in the template file.I then added the following code as suggested in your FAQ:
if ( function_exists('cc_zoom_featured_image') ) { cc_zoom_featured_image(); //This throws up the error below //echo do_shortcode( '[zoom zoomin=2]' ); this works }
But it throws up this error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function cc_zoom_featured_image(), 0 passed in C:\Users\Colin\Documents\My Web Sites\Divi\wp-content\themes\mesmerizechildtheme\template-parts\content-info.php on line 18 and at least 1 expected in C:\Users\Colin\Documents\My Web Sites\Divi\wp-content\plugins\featured-image-zoom\featured-image-zoom.php:84 Stack trace: #0 C:\Users\Colin\Documents\My Web Sites\Divi\wp-content\themes\mesmerizechildtheme\template-parts\content-info.php(18): cc_zoom_featured_image() #1 C:\Users\Colin\Documents\My Web Sites\Divi\wp-includes\template.php(724): require(‘C:\\Users\\Colin\\…’) #2 C:\Users\Colin\Documents\My Web Sites\Divi\wp-includes\template.php(671): load_template(‘C:\\Users\\Colin\\…’, false) #3 C:\Users\Colin\Documents\My Web Sites\Divi\wp-includes\general-template.php(168): locate_template(Array, true, false) #4 C:\Users\Colin\Documents\My Web Sites\Divi\wp-content\themes\mesmerizechildtheme\single-grave.php(18): get_template_part(‘template-parts/…’, ‘info’) in C:\Users\Colin\Documents\My Web Sites\Divi\wp-content\plugins\featured-image-zoom\featured-image-zoom.php on line 84
So what arguments do I have to put in to get the code to work?
Thanks
Colin
- The topic ‘Template function throws up an error’ is closed to new replies.