Magento 2.1 – Changing Review List Position on Product Page

customlayoutmagento-2.1product-viewreview

I am building a custom theme in magento2.1. In product details page, I need to show customer review list after the review form. By default the list of recent reviews will come first in tab panel followed by review form. I need to show review form first. I have copied
vendor/magento/module-review/view/frontend/layout/catalog_product_view.xml

and pasted in

app/design/frontend/custom/theme/Magento_Review/layout/catalog_product_view.xml

and added

<referenceBlock element="product.info.product_additional_data" after="product.review.form"/>

before closing the body tag. But not affecting in my site. Am I doing right? Can any one please help me?

Best Answer

You need to copy the below file in your custom theme:
vendor/magento/module-review/view/frontend/templates/review.phtml

and change calling the childHtml function position:

from

<div id="product-review-container" data-role="product-review"></div>
<?php echo $block->getChildHtml(); ?> 

to

<?php echo $block->getChildHtml(); ?>   
<div id="product-review-container" data-role="product-review"></div>