Home › Forums › Calendar Products › Events Calendar PRO › Text in Price Field
- This topic has 5 replies, 4 voices, and was last updated 9 years, 4 months ago by
Gregg.
-
AuthorPosts
-
November 6, 2016 at 3:31 pm #1188439
Gregg
ParticipantHi,
I found a thread that explained that I could enter a text value in the price field by adding the code below to my theme’s function.php file. I added this code to the function.php field, but Google console is still displaying a structured data error.
Thanks for your help
CODE ADDED TO FUNCTIONS.PHP
add_filter( ‘tribe_get_cost’, ‘cost_show_full_meta_field’, 10, 2 );function cost_show_full_meta_field( $cost, $post_id ) {
$full_cost = tribe_get_event_meta( $post_id, ‘_EventCost’, false );if ( isset( $full_cost[0] ) ) {
return sanitize_text_field( $full_cost[0] );
}return $cost;
}November 7, 2016 at 10:22 pm #1188954Geoff B.
MemberGood evening Gregg and welcome back!
Thank you for reaching out to us.
We are sorry to hear about the structured data error you are getting.
I would love to help you with this topic.As a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
Secondly, could you please provide me with a specific example of where you are getting the error (a URL, some screenshot, etc..).
Hang in there as we research this together.
Best regards,
Geoff B.
November 17, 2016 at 2:49 am #1193757Gregg
ParticipantThis reply is private.
November 17, 2016 at 8:47 pm #1194318Geoff B.
MemberGood evening Gregg and thank you for the info,
I went ahead and tested the page you provided with the structured data testing tool.
I am seeing 2 errors and 2 warnings, but none of these seem to apply to the cost field specifically.
Maybe I am missing something, but could you help me understand how you are under the impression that the text in the cost field is causing these errors and warnings ?
Best regards,
Geoff B.
December 9, 2016 at 8:35 am #1203960Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Text in Price Field’ is closed to new replies.
