I can;t display custom fields in the frontent

[ad_1]

Hi there, I have been created two custom fields with acf and I want to display them in every post in the front end in two diferrent places (after post title the first and after excerpt the second) with labels explaining each value. Also the same when posts displaying in blog archive posts. I added the code below (only for the first custom field) in the file content.php under the post title section. I am not familiar with coding and I need your help please!

            $custom_field_value = get_field( 'syggrafeas' );
            if ( $custom_field_value ) {
                echo '<div class="custom-field-label">Συγγραφέας:</div>';
                echo '<div class="custom-field-value">' . esc_html( $custom_field_value ) . '</div>';
            }
            ?>

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer