-
Notifications
You must be signed in to change notification settings - Fork 14
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
Make bootstrapping Wordpress optional (if already loaded) #4
Comments
Created a branch in here: https://github.com/kayue/WordpressBundle/tree/feature/%234-bootstrapping Already completed the following:
|
You said: But, the code sample is the other way around (Symfony2 in Wordpress). Is there an overview of the features that this bundle adds to a basic Symfony2 installation? How can I execute the Wordpress get_footer() function in my Symfony Twig template? |
Another comment to the bootstrapping; is the bootstrapping as it happens here similar to what is described in http://inchoo.net/wordpress/twig-wordpress-part2/ |
Have you tried {{ wp.getFooter() }} ? On Saturday, January 19, 2013, Rvanlaak wrote:
|
The installation from Packagist is not working correct yet, I get the following error: [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception [RuntimeException] |
After a succesfull deployment and configuration I now get the following error: Fatal error: Call to a member function add_shortcode() on a non-object in /home/scribbr/sites/scribbr/web/wp-content/plugins/contact-form-7/includes/shortcodes.php on line 174 I've added Wordpress to the /web folder and I'm adding all classes to the Symfony autoloader: "autoload": { Any clue? SOLVED: I've found the answer on http://wordpress.org/support/topic/plugin-contact-form-7-cf7-shortcode-error |
Currently WordpressBundle will force the Symfony app to load
wp-load.php
to makewp_get_current_user()
available, however this is not needed if Symfony app is loaded within a Wordpress.I have already figured out a way to initiate a Symfony app within a Wordpress theme (or plugin). Simply place the following code to the top of a Wordpress theme's functions.php :
This way we can use most of the template function (if not all) in Symfony.
I have created a Wordpress Twig extension (https://github.com/kayue/WordpressBundle/blob/master/Extensions/WordpressTwigExtension.php).
The text was updated successfully, but these errors were encountered: