Support

Account

Home Forums Front-end Issues Data from the_field doesnt show up on the right place Reply To: Data from the_field doesnt show up on the right place

  • Yes, it is. Sorry, but you are using the wrong function. The values are in the wrong place because they are echoed at the point where the function the_feild() is called.

    Example:

    
    // this will output the value of a field here
    // and set $value == NULL
    // because the_field() does not return a value
    $value = '<p>The value of the field is echoed here ('.the_field().')</p>';
    
    // this will echo the <p> with nothing in the ()
    // because the_field() already echoed the value above 
    // and returned NULL
    echo $value
    
    

    I won’t go into the issues with using ‘the_terms()’ in the context that you are attempting to use it. Removing that from one of your lines what it should look like is this

    
    $ouput .='<div>'
    .'• Erscheinungsdatum:<span>'
    .get__field('produziert')
    .'</span>• FSK: <span>'
    .get__field('fsk')
    .'</span>• Filmlänge: <span>'
    .get__field('filmlaenge')
    .'</span>• Schauspieler:'
    .'</div>';
    
    echo $output;
    
    


    the_field()

    get_field()