Viewing 5 replies - 1 through 5 (of 5 total)
  • __( "PREZZI/ SETTIMANA", 'textdomain' ) . get_post_meta( $post->ID, "function_name", true ); 

    Or with space between the texts:

    __( "PREZZI/ SETTIMANA", 'textdomain' ) . ' ' . get_post_meta( $post->ID, "function_name", true );

    I hope the value is a string, not an array.

    Thread Starter sacconi

    (@sacconi)

    unlickily it breacks the site…

    Assumption: you have a “;” at the end of the line, but it should be a comma “,”. The error message in your error log should point this out to you.

    Thread Starter sacconi

    (@sacconi)

    yes, I also eliminated “;” and kept only “,”, the site in this case doesn breack but I cant see either the meta value printed

    Moderator bcworkz

    (@bcworkz)

    Have you declared global $post; at the beginning of your function? This is required for $post->ID to work as expected.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.