Text in Price Field

Home Forums Calendar Products Events Calendar PRO Text in Price Field

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1188439
    Gregg
    Participant

    Hi,

    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;
    }

    #1188954
    Geoff B.
    Member

    Good 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.

    #1193757
    Gregg
    Participant

    This reply is private.

    #1194318
    Geoff B.
    Member

    Good 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.

    #1203960
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Text in Price Field’ is closed to new replies.