I want to integrate Wordpress in my site (fuelphp).
I can push the "wordpress" folder in "public", and access with url mysite.com/wordpress, it's work, but i want to use Fuelphp function in my wordpress frontend, and wordpress function in my fuelphp frontend..
For example : Keep the same layout (construct with fuelph), the same menu (construct with fuelphp), etc.
What is the best way ?
Maybe create an other front controller for wp ? Like Controller_Blog which extends Controller_Hybrid, and include WP librairies in the before() function ?
Hmm ok. And if i want to just create a theme for wordpress. And in this theme, i want to use existing views from fuelphp (like header, menu, sidebar, etc..), it's possible ?
if ( $template = apply_filters( 'template_include', $template ) )
include( $template );
?>
</code>
It's include the wordpress theme
4. I have create a new route for redirect all request in the index action
<pre>
'news(/:any)' => 'news/index', // The wordpress route
</pre>
Now i access on my wordpress blog with fuelphp via "mysite.com/news" (my wordpress folder is named "wordpress"). And i can use Fuelphp functions and forge view in my wordpress theme !
The problem : I can always access to my wordpress blog without fuelphp via "mysite.com/wordpress". How i can disabled this ? But i want to always access "mysite.com/wordpress/wp-admin" for backend.
I usually create a sub-domain if I need to integrate wordpress or some other system. So if my site is http://mysite.com then I put WordPress to http://blog.mysite.com, but I try to avoid mixing two systems as much as possible because you can ran into all sorts of problems.
Sure, but if you need to keep the same layout between your fuelphp theme and wordpress, what do you do? You create the same theme for wordpress? This is not great...
If you mix fuelphp and wordpress, you can use View::forge for use your fuelphp theme in your wordpress theme for example.