Support

Account

Home Forums General Issues Generating Tab Content Dynamically

Solved

Generating Tab Content Dynamically

  • I have four tabs, the first three have ACF fields and everything works fine.

    The fourth tab is empty, and I would like to fill the content of that tab by calling a function that would spit the required HTML.

    I hooked on the ‘acf/render_field/key’ hook and the function gets called. The test function just spits out:

    echo ‘<h1>Hello Cow</h1>’;

    When I view it, the text is not visible even though it’s in the DOM and even if I move the H1 to where it should be, it is displayed on all tabs.

    Which would be the best way to do this, that is, to fill out a Tab from a TabField dynamically?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.