Choose a left sidebar, right sidebar or 1 column layout for WordPress blog pages in Magento
The Page Layout group sets where the blog sidebar goes. Listing pages and single posts have separate settings, so you can, for example, keep the sidebar on listings and give posts the full width. Added in 2.1.0.
Admin path: Stores > Configuration > OCMLabs > WordPress Integration > Page Layout
Settings
Both settings offer the same three layouts:
| Option | Magento page layout | Result |
|---|---|---|
| 2 Columns with Left Sidebar | 2columns-left | Sidebar on the left. This is the default and matches earlier versions. |
| 2 Columns with Right Sidebar | 2columns-right | Sidebar on the right |
| 1 Column (No Sidebar) | 1column | Full-width content with no sidebar |
Listing Pages Layout
Used for the blog home, category, tag, author and search pages.
- Default: 2 Columns with Left Sidebar
Single Post Layout
Used for single post pages.
- Default: 2 Columns with Left Sidebar
Both can be set per website or store view.
Mobile
On phones the two columns stack. With the left sidebar, the sidebar comes before the posts, so visitors scroll past it to reach the content. If most of your blog traffic is on mobile, try the right sidebar layout and check the order on a phone.
These settings replace the page layout set in the module’s layout XML. If your theme sets a layout attribute in its own ocmlabs_*.xml files, the admin setting still wins. To choose the layout in code instead, add a plugin on OCMLabs\WordPressIntegration\Model\Config::getListPageLayout() or getPostPageLayout().
See also
Related pages
- Sidebar blocks shown in the sidebar column
- Layout handles reference