Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants