Support

Account

Home Forums Front-end Issues Display append on frontend

Solving

Display append on frontend

  • Hello,

    how can I display the text I entered in the append in the backend (in my case km and h) display also on the frontend behind the entered value?

  • 
    $field = get_field_object('field_name');
    echo $field['append'];
    
  • Hi there,

    I am using Elementor to display the custom fields and I would like to display append and prepend for some values in the frontend.
    I could not get it to work yet. Could you provide further instructions where to add the PHP code? I tried to paste it at the end of my themes functions.PHP file, but that did not show results. Do I paste it somewhere else?

    1. I added to the PHP file:

    $field = get_field_object('height');
    echo $field['append'];

    2. I added the code directly to my Elementor theme templates HTML:
    <p><?php $field = get_field_object('height'); echo $field['append'];?></p>

    I am not sure what I am getting wrong here. Are you able to help me?

    many thanks!
    Moritz

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.