Home › Forums › Front-end Issues › How to display created custom fields on front end? › Reply To: How to display created custom fields on front end?
Hi Jonathan thank you very much for your response.
I created custom page template in that i have given below code
<?php
/*
Template Name: My Custom Page
*/
?>
<?php get_header(); ?>
<div class=”container”>
<h1 class=”post-heading”><?php the_title(); ?></h1>
</div> <!– .container –>
<div class=”page-wrap container”>
<div id=”main-content”>
<div class=”main-content-wrap clearfix”>
<div id=”content”>
<div id=”left-area”>
<?php while ( have_posts() ) : the_post(); ?>
<article class=”entry-content clearfix”>
<?php if ( ! $featured_image ) : ?>
<h1 class=”main-title”><?php the_title(); ?></h1>
<?php endif; ?>
<p><?php the_field(‘company’); ?></p>
<p><?php the_field(‘address’); ?></p>
<p><?php the_field(’email’); ?></p>
<p><?php the_field(‘phone’); ?></p>
<p><?php the_field(‘website’); ?></p>
<p>
</article> <!– .entry –>
<?php endwhile; ?>
</div> <!– end #left-area –>
</div> <!– #content –>
<?php get_sidebar(); ?>
</div> <!– .main-content-wrap –>
</div> <!– #main-content –>
<?php get_footer(); ?>
When i created a new page i assigned a “My custom Page” template.
and i got it.
Thank you very much
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.