ACF Not Displaying on Front End

I’m not sure what is wrong, but I have an older installation of Wordpress and Pro on our agency site and it’s no longer displaying ACF content on the front end. I’ve added the normal php fix to the Functions.php file and still nothing.

Could anyone assist me in figuring out what’s going on here?

Hello @Nuera,

Thanks for writing in!

Are you trying to display the ACF Subheading on the frontend?

You will need to edit the template or use a custom layout to be able to display this field. I also have checked your child theme and I am not seeing any code that will enable you to display the sub heading on the frontend.

By the way, please have your Pro theme updated to the latest version which is the Pro 5.1.1. After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

And please clear your browser cache too. You may use private browsing mode in testing your site to make sure that you are viewing the latest codes from the updates and not the cached version in your browser.

Best Regards.

Hey Rue Nel,

This is what we added to the functions.php, per the advice on the open web:

// ACF Display Custom Fields
add_filter('acf/settings/remove_wp_meta_box', '__return_false');

In regards to updating the theme - we have attempted it many times on a test environment but unfortunately we have too many customizations and updating the theme breaks too many things. This site will have to remain without updates for the rest of its life cycle. We will build a new site from scratch using the newest release when it comes time.

Hi Nuera,

As my colleague @ruenel said, I can’t also find the modified file that will enable you to display the subheading on the front-end. The code you added will not display the ACF on the front-end, you should create a template file on your child theme.

On the other hand, you can also utilize the layout builder if you update the theme to the latest version and display your ACF field so easily.

Hope that helps.

What would we need to add in order to display the ACF field? And where would we need to add it?

And yes, we’re big fans of the updated theme features and use them constantly on other installations- it’s just not an option for this particular task.

Hello @Nuera,

You are using an older version of the Pro theme. If you update to the latest version which is Pro 5.1.2, you can utilize the Layout Builder and be able to create your own single layout to display single posts and then use the ACF dynamic shortcode in the layout to be able to display the ACF fields in your single posts. Kindly check out this documentation:

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.