WPIntell

Source evidence

Accessing comment field data

Comments Extra Fields For Post,Pages and CPT · support · 2023-07-23T23:02:00+00:00

praisesentiment
mediumseverity
0.43relevance
2replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 19 rows with source links

15.8% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

16 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Cory unresolved
I have some custom comment notifications I’m writing for a client. The function takes the comment ID and builds the notification content. I’m trying to incorporate information in the custom field, but nothing comes through. I expected to be able to use: get_comment_meta($comment_id, "field_key", true); But no data comes back. Was I right to expect this to work? Is the field data stored differently? Hi, please use following code get_comment_meta($comment_id, "wpcomment_fields", true); and it will return meta as array with key value. Thanks, that got me what I needed. To clarify, the return value contains a key fields with an array of the meta values.

Comments

2 shown
N-Media 2023-07-27T03:47:00+00:00

Hi, please use following code get_comment_meta($comment_id, "wpcomment_fields", true); and it will return meta as array with key value.

Cory 2023-07-27T04:55:00+00:00

Thanks, that got me what I needed. To clarify, the return value contains a key fields with an array of the meta values.