on Magento 2.2.5 I want to move the related products via xml . I have a div with a class of "yotpo yotpo-main-widget yotpo-small" and I want the related products in side this div at the top before any of the divs/content inside this div is loaded.
In the
app/design/frontend/luma/Magento_Catalog/layout/catalog_product_view.xml
I have the below in my xml
<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<move element="page.main.title" destination="product.info.main" before="-"/>
<move element="prev_next_products" destination="product.info.main" before="-"/>
<move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
<move element="product.info.review" destination="product.info.main" before="product.info.price"/>
<move element="product.special.price" destination="product.info.main" after="product.info.price"/>
<move element="product_view_try_on" destination="product.info.media" before="-"/>
<referenceBlock name="product.attributes" remove="true" />
<referenceContainer name="content">
<block class="Magento\Catalog\Block\Product\View" name="product_custom_name" template="Magento_Catalog::product/view/product_custom_name.phtml" before="-"/>
<block class="Magento\Framework\View\Element\Template" name="product_view_try_on" before="product.info.media" template="Magento_Catalog::product/view/try_on.phtml"/>
</referenceContainer>
<move element="product_custom_name" destination="product.info.main" before="-"/>
<referenceBlock name="page.main.title" display="false"/>
<move element="product_related" destination="yotpo-main-widget" before="-"/>
</body>