Archived topic
Warning: Use of undefined constant ID - assumed 'ID' (this will throw an Error..
3 replies · Started by Kuk on May 1, 2020
I have an error on my local installation of a site that I've just started. it is a PHP error and the full error message is as follows:
Warning: Use of undefined constant ID - assumed 'ID' (this will throw an Error in a future version of PHP) in C:\wamp64\www\contentpros\wp-content\plugins\gp-premium\elements\class-hooks.php(180) : eval()'d code on line 10
This error shows up in my "single" pages.
I installed GP Premium, then the Elementor page builder as well as the required plugins Safe SVG and WP Show Posts. Then imported the BOLD theme from the site library.
I have literally done nothing else other than the above steps.
Hi there,
Looks like a bug in the Bold site.
Go to "Appearance > Elements" and open the "Single Post Sidebar" element.
Find this line:
<?php echo get_avatar( get_the_author_meta( ID )); ?>
And replace it with this:
<?php echo get_avatar( get_the_author_meta( 'ID' )); ?>
Let me know if that helps or not :)
thanks! that did it! appreciate it.
No problem! Sorry for the trouble :)