ACF and Sage 9?

Hi all! I’m pretty new to Wordpress theme development, but very well versed with HTML / CSS / JS. Recently, I was introduced to Sage and began to tinker with the different components to start learning Wordpress dev. I set up a Docker container with a fresh Wordpress install, installed Sage, messed around a bit with the code.

I then installed ACF via the built in plugin menu on the admin panel. I configured a few fields, set up a filter to export the data, but no matter what I do the data is not showing up on the page I would like it to. Couldn’t find any resources but it must be something silly I’m doing wrong. Any help would be appreciated!!!

Are you using the following for setting up the filters?

:point_up: This is the simplest way of passing the ACF data to the templates.

There is also the Controller option (comes packaged with Sage):

I’m personally more familiar with using controllers.

Also, can you post what you’ve tried so far.

Certain versions of Controller prevent filters from working correctly. Try removing Controller if you aren’t using it.

2 Likes

Here’s my Blade filter code:

I changed it from the specific page that I was testing on (home), to all of the pages in an attempt to get it to work.

Here’s my code trying to call the data:

.

Holy crap, THANK YOU! This was the solution.

For anyone reading this researching the same problem, just remove Controller from your composer.json and run composer update.

2 Likes

Aside: for best practice use the templating language in blade templates, rather than raw php:

<h3>My name is {!! $first_name !!}</h3>