Hi MYGM,
here you can echo extra comment fields
echo $comment_meta_key = $meta['data_name'];
$comment_meta_val = get_comment_meta($comment -> comment_ID, $comment_meta_key, true);
Where $meta['data_name'] is the extra field name you set in our pluin. I hope it will help you.
Thread Starter
MYGM
(@mygm)
thanks for the reply however, how would i fit that into my previous code and echo it out ?
Almost a year and no reply these guys are not the greatest at this support stuff.
here was my solution to trying to get the values to display where i wanted them to
Save your value to a variable
<?php $role = get_comment_meta($comment -> comment_ID, 'role', true);?>
in my case i name the extra field role in there plugin so all you have to do is use the get_comment_meta hook for wordpress and the change role to what ever you named yours
then simply echo it out
<?php echo $role ?>
if you didnt already figure it out hope this helps
(@mygm)
10 years, 9 months ago
Hi I am trying to figure out how to echo the newly created fields in my theme template.
I tried using the following code in a few variations and couldnt come up with anything that works.
https://ww.wp.xz.cn/plugins/wp-comment-fields/