Home Forums Front-end Issues Var Dump Issue


Var Dump Issue

  • Hello,
    I’ve been using ACF for years and not encountered this issue with a var dump before. I’ve going through every post and Stack Overflow that seems relevant and have not been able to figure it out. Version is the latest PRO, running locally on MAMP (php 7.4.21), custom theme based off HTML5Blank.

    It’s a pretty standard var dump:

    <?php $acf_fields = acf_get_fields('19'); echo var_dump($acf_fields); ?>

    I have the location rule for the field group set to Page Template == Front Page which is appropriate.

    I get a var dump on the home page but everything but the field IDs is blank despite having slides set up for the page.

    Structure is:

    Hero Slides (Group)
    – Hero Slide (repeater)
    — Headline (text)
    — Sub Headline (text)
    — Link Text (text)
    — Link URL (URL)
    — Background Image (image)

    I’ve tried var dumping both the numerical post ID (i.e. ’19) and the name (i.e. ‘home_slides’). ### Edit Using ‘home_slides’ now returns an array of 0 which tells me the custom fields aren’t associated to the page output, but they appear to be. Any ideas?


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.