Magento WordPress Integration Theme CustomisationWordPress Integration

« Back to Magento WordPress Integration

Magento WordPress Integration integrates WordPress into your Magento 2 theme. The WordPress theme is not responsible for the front end display of your blog and all design changes must take place in Magento 2.

Magento WordPress Integration comes with pre-templates that display all blog data in a standard and clean way. These templates can be found at:


Do not edit templates directly in this location. To make changes to any of these files, copy the template that you want to edit to your custom theme and edit it there.

As an example, let's consider you have a custom theme at the following location:


Now let's say you want to modify the post view template, which can be found at:


You would copy this to your custom theme at:


To break this down, in your custom theme, you create a new folder using the name of the module that the template belongs to, which in this case is FishPig_WordPress. Ensure that you get the correct capitalisation here. Next you just copy the template structure from the original location (templates/post/view.phtml).

Understanding the Templates

There are 2 different types of views in WordPress. The first view is the archive view and the second view is the single post view.

Single Post View

This is when you view a single post on it's own. The following template is used for this:


This template is actually the fallback template used for all post types. The module will first look for a template specific to the post type:


In the above example POSTTYPE will be replaced with the actual type of the current post. For example, you could create a custom view.phtml that is used for pages by creating the following template file and moving it to your custom theme:


Post Archives

Post archives are all pages that list multiple posts such as the homepage or a category page. The view for archive pages is made up of several templates.

The first template is the wrapper template. This wraps around the post list and includes the H1, a description and then the call to the post list. By default the same wrapper template is used for all archive pages, however you can change this using layout XML.


The next template down is the list template. This template is responsible for looping through the post collection and outputting each post. This template can be found at:


The final template is the post renderer template. This is the template that actually renders the specific post data, including the post title, featured image, post excerpt or content and any thing else that you want to include. This template can be found at:


This is the post renderer template for all posts type and is a fallback template. The module first checks for the following template, where POSTTYPE is the actual post type of the post.


If your post type was 'article', the template would be:


If the custom template doesn't exist in your custom theme then the fallback template is used.

Layout XML

Layout XML plays a big role in modifying the design. For more information on this, please see the Magento WordPress Integration layout XML guide.


The extension comes with a basic stylesheet that can be found at:


To modify this file you must first copy it to your custom theme at the following location: