I would like to display a CMS Static Block text box at the bottom of all product listings in Magento, but I would need the code to put in CMS -> Static Blocks in the admin panel in order to do so.
Any help would be appreciated, thank you.
You need a custom theme or a module to do this. In the case of a theme, create the following file:
/app/design/frontend/[Company]/[ThemeName]/Magento_Catalog/layout/catalog_category_view.xml
WIth the following content:
<?xml version="1.0"?>
<!--
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Cms\Block\Block" name="yourblockname">
<arguments>
<argument name="block_id" xsi:type="string">id_defined_in_block_admin</argument>
</arguments>
</block>
</referenceContainer>
</body>
</page>
Your block will then appear at the bottom of all product listing (category) pages.
you can add code in your list.phtml from your theme(template\catalog\product).
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml();
?>