Reputation: 621
I created a new template for a page.
<?php
/**
* Template Name: Sponsors For Homepage
*/
?>
<html>
<body>
<?php get_header('sponsor'); ?>
<div class='divone'>
<?php the_content(); ?>
</div>
<div class='divtwo'>
<?php sponser_advertisement(); ?>
</div>
</section>
</body>
</html>
And I added a new custom field for the template. Using the Advanced Custom Fields plugin 4.4.8
I made sure that the field would show on the correct template:
The fields showed up on my template page
For some reason the field value "This is the new field" does not not show up when I preview the page in my browser.
Thanks in advance.
Suggestions?
Upvotes: 0
Views: 548
Reputation: 318
This is the wrong way to display the custom field value.
If you want to display custom field values in your template, using Advanced custom fields plugin you have to use functions like these:
<?php the_field('field_name'); ?>
or
<?php echo get_field('field_name'); ?>
you can find full documentation on working with ACF values in here: ACF Documentation
Upvotes: 1