I'm trying to retrieve the value of the fields I created via Advanced Custom Fields (ACF).
At the moment, I have 3 field groups. However, when I try to retrieve the values of the fields, I'm only able to retrieve the value of one of the field group. I can't retrieve the value of the other 2 field groups.
I've tried the_field(), get_post_meta(), get_field(), get_field($post->ID),get_field('field_name', post_id) but all returns either NULL or False.
I've also tried get_fields() and this one returns the array of one of the field group only.
When I try to var_dump the variable to verify if the values were retrieved, this is what I get instead.
https://prnt.sc/ptvjsa (link to the screenshot)
<?php
/*
Template Name: Home Page
*/
// Advanced Custom Fields (Product Categories)
$category_section_desc = get_field('our_product_description'); // 1 of the 3 field groups I created
$category_title = get_field('category_title'); // 2nd of the 3 field groups I created
$product_name = get_field('product_name'); // 3rd of the 3 field groups I created
get_header();
var_dump($category_title);
var_dump($product_name);
?>
My goal is to retrieve the values of the fields from the other field groups and display them all together in 1 page - the home page.