Default Blocks

Magento comes with a lot of default blocks that you will most likely need to use. The following will help you access these blocks and get you started with Integrating your Magento store into your WordPress website.

Page Blocks

// Echo full Magento head file
the_block('head');

// Get specific elements from the head
$head = get_block('head', false);
echo $head->getCssJsHtml(); // All CSS and JS files defined in your Magento head
echo $head->getChildHtml();
echo $head->helper('core/js')->getTranslatorScript();
echo $head->getIncludes();

// Echo your Magento header
the_block('header');

// Echo your Magento footer
the_block('footer');

// Echo Magento messages
the_block('global_notices');
the_block('global_messages');
the_block('messages');

// Additional page layout blocks
the_block('after_body_start');
the_block('before_body_end');

// Sidebars
the_block('left');
the_block('right');

// Toplinks
the_block('top.links');

// Language Switcher
the_block('store_language');

// Top menu
the_block('top.menu');

Catalog Blocks

// Catalog top navigation
the_block('catalog.topnav');

// Left permanent callout
the_block('left.permanent.callout');

// Compare sidebar
the_block('catalog.compare.sidebar');

// Right permanant callout
the_block('right.permanent.callout');

Checkout Blocks

// Sidebar Cart
the_block('cart_sidebar');

Poll Blocks

// Sidebar Poll
the_block('right.poll');

Report Blocks

// Products Viewed
the_block('right.reports.product.viewed');

// Products Compared
the_block('right.reports.product.compared');

Wishlist Blocks

// Wishlist sidebar
the_block('wishlist_sidebar');

Newsletter Blocks

// Newsletter subscribe
the_block('left.newsletter');

Search Blocks

// Top search
the_block('top.search');