What is Wordpress Bundle?
v2.3.0
This package is a Symfony Bundle designed to use WordPress with Symfony.
Blog Controller example for single page
/**
* src/Controller/BlogController.php
*
* @param Post $post
* @param PostRepository $postRepository
* @param BreadcrumbService $breadcrumbService
* @return Response
*/
public function pageAction(Post $post, PostRepository $postRepository)
{
$context = [];
// get current post
$context['post'] = $post;
// find 10 "brands" ordered by title
$context['brands'] = $postRepository->findBy(['post_type'=>'brand'], ['title'=>'ASC'], 10);
return $this->render('page.html.twig', $context);
}Twig template example for single page
Demo
Got 2 minutes? Checkout the demo of our bundle
Feature list
Getting started
Follow our handy guides to get started on the basics as quickly as possible:
InstallationWordpressRouterCron jobTemplatesFundamentals: Dive a little deeper
Learn the fundamentals of Wordpress Bundle to get a deeper understanding of our main features:
Argument resolverControllerEntityRepositoryServiceLast updated
Was this helpful?