dirname(__FILE__) giving wrong path

I’ve always used ACF with Flexible Content because I think its a great way to create blocks/components that needs to be used or repeated thought the site.

I’m using Sage now, and prior to that I tried different things.

I’m having an issue with this though,

The path I get, is this

...wp-content\themes\kayTheme\storage\framework\views\blocks\text.php

While using this code: $flexibleContentPath = dirname(FILE) . ‘\blocks\’;

That’s one issue - how do I fix this? So far I wrote the hardcoded path.

This topic was automatically closed after 42 days. New replies are no longer allowed.