Support

Account

Home Forums General Issues How to display a value from a parent page? Reply To: How to display a value from a parent page?

  • maybe that works / help you

    <?php
    $post_ID = get_the_ID();
    $parentpost_id = wp_get_post_parent_id( $post_ID );
    $attachment_id = get_field( "broschuren-download", $parentpost_id ); //use parents-post field: "broschuren-download"
    $url = wp_get_attachment_url( $attachment_id );
    $title = get_the_title( $attachment_id );
     ?><div class="pdf-download"><a href="<?php echo $url; ?>" >Broschüre herunterladen</a></div>