• 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') ?>
                    </div>
                <?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): https://prodynamo.ca/wordpress/services/

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

    Thanks in advance

    Cory

    https://www.ads-software.com/extend/plugins/advanced-custom-fields/

Viewing 1 replies (of 1 total)
  • Audee

    (@graphicidentity)

    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!

    Cheers,
    ~ A u d e e

Viewing 1 replies (of 1 total)
  • The topic ‘Can't display fields on index.php’ is closed to new replies.