Home › Forums › Front-end Issues › Some fields are not showing up.
Hi there,
Just start using your awesome plugin! The only problem I can’t figure out is that some fields are not working in the front end. I just set the fields up in the WP-admin and requested the fields with the required codes.
The website is: http://xoxomarketing.nl.transurl.nl
The fields <h2><?php get_field(‘titel_recensie’); ?></h2> and <?php get_field(‘tekst_recensie’); ?>
are not showing up in the frontend. Only when i put them in the upper part of the website.
Code of the website:
‘<?php /* Template Name: Front-template */
get_header();
?>
<main id=”content”>
<?php while ( have_posts() ) : the_post(); ?>
<div id=”header_home”>
<div id=”header_home_content”>
<h2><?php the_field(‘header_titel’); ?></h2>
<div id=”home_header_button_wrapper”>
<div id=”home_header_button” class=”cta_button”><?php the_field(‘header_left_button’); ?></div>
<div id=”home_header_button” class=”cta_button”><?php the_field(‘header_right_button’); ?>
</div>
</div>
</div>
</div>
</header>
<div id=”home_services2″>
<h2>Je kan me inschakelen voor:</h2>
<div id=”home_services2_list”>
<ul class=”home_services2_list1″ style=”list-style-image: url(‘/theme/css/icons/image-editor.png’);”>
<ul class=”home_services2_list2″ style=”list-style-image: url(‘/theme/css/icons/image-editor.png’);”>
</div>
</div>
<div id=”home_blog_latest”>
<h2>Mijn blog</h2>
<?php the_field(‘titel_recensie’); ?>
<?php
$args = array( ‘numberposts’ => 1 );
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?>
<div id=”home_blog_latest_wrapper”>
<div id=”home_blog_latest_left”>
/img/iphone_8plus.png” />
” />
</div>
<div id=”home_blog_latest_right”>
<h3>“><?php the_title(); ?></h3>
<?php the_content(); ?>
<?php endforeach; ?>
</div>
</div>
</div>
<div id=”home_references” style=”background-image: url(‘<?php if( get_field(‘Achtergrond_recensie’) ): ?><?php the_field(‘image’); ?><?php endif; ?>’); height: 200px;”>
<div class=”home_references_content”>
<h2><?php get_field(‘titel_recensie’); ?></h2>
<?php get_field(‘tekst_recensie’); ?>
</div>
</div>
<div id=”home_instagram”>
<h2>Instagram</h2>
<?php echo do_shortcode( ‘[instagram-feed]’ ); ?>
</div>
<?php endwhile; // end of the loop. ?>
</main>
<?php get_footer(); ?>`
The topic ‘Some fields are not showing up.’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.