Advanced Custom Fields
Can't display fields on index.php (2 posts)

  1. CoryDobson
    Posted 3 years ago #

    I'm trying to display 2 fields on the blog page of a site I'm developing, but they don't seem to post. This is what my code looks like:

    <?php if (get_field('blog_description')) { ?>
                    <h2><?php the_field('blog_heading') ?></h2>
                <?php } ?>
    			<?php if (get_field('blog_description')) { ?>
                    <div id="blogMainDescription">
                        <?php the_field('blog_description') ?>
                <?php } ?>

    I've used the same code on other template files for other pages, and they work fine, but I can't seem to get it working on the index.php file. Is there a specific way to post on the index.php file?

    For an example, see the following pages:

    Working page (same code, different field names): http://prodynamo.ca/wordpress/services/

    Non working page (triple checked field names): http://prodynamo.ca/wordpress/blog/

    Thanks in advance



  2. Audee
    Posted 3 years ago #

    I have the same problem with Cory here.
    I don't know how to display custom field on index.php

    It will be nice if the plugin author will update the tutorial in the future for this purpose.

    Thank you!

    ~ A u d e e

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.