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

get symfony service from wordpress function #140

Open
christiancannata opened this issue Jul 3, 2019 · 1 comment
Open

get symfony service from wordpress function #140

christiancannata opened this issue Jul 3, 2019 · 1 comment

Comments

@christiancannata
Copy link

Call to a member function get() on null when I try to call a symfony service from functions.php in my wordpress theme.
I want to use symfony services in my functions.php inside wordpress theme folder.

@eko
Copy link
Collaborator

eko commented Jul 4, 2019

Hi @christiancannata,

Have you add the index.php trick in order to access the Symfony container inside Wordpress? (see README.md file on the repository: https://github.com/ekino/EkinoWordpressBundle#3-update-your-wordpress-indexphp-file-to-load-symfony-libraries)

It appears the $container (static variable) is not available?

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

2 participants