Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working when installed inside roots/bedrock environment #59

Open
mortensassi opened this issue Nov 25, 2021 · 3 comments
Open

Not working when installed inside roots/bedrock environment #59

mortensassi opened this issue Nov 25, 2021 · 3 comments

Comments

@mortensassi
Copy link

Thanks for your great extension! Unfortunately when i install the plugin in the root of my bedrock setup, my blocks won't get recognized in the backend. However, installing this plugin inside the theme-directory works. I guess it has something to do with timing and if the Timber-Class exists?

@palmiak
Copy link
Owner

palmiak commented Nov 25, 2021 via email

@mortensassi
Copy link
Author

Yeah you can see bedrock loads first the dependencies but i guess in that moment nor ACF or Timber get recognized. When i think about deployment later, i guess its more suitable when theme-related extensions are part of the theme.

@merijnponzo
Copy link

In my bedrock setup it's working with both installation methods (plugin, or directly from autoload)

In my composer

"palmiak/timber-acf-wp-blocks": "^1.15"

don't forget to

composer dump-autoload

after your install

and in my theme

// init timber
$timber = new \Timber\Timber();
// init timber acf blocks
if ( class_exists( 'Timber_Acf_Wp_Blocks' ) ) {
	new Timber_Acf_Wp_Blocks();
   
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants