In content/page homepage I insert a widget from the porto theme:

{{block class="Smartwave\Filterproducts\Block\Home\LatestList" name="latest_product" 
product_type="4" product_count="50" category_id="2" aspect_ratio="1" image_width="300" image_height="300" 

The template file grid.phtml is in


I am modifying the product link so it opens in a new tab:

<a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">
<a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1" target="_blank">

I then run the following commands from a bash script:

rm -rf ../var/* &&
rm -rf ../pub/static/ &&
php ../bin/magento setup:upgrade &&
php ../bin/magento setup:static-content:deploy en_GB en_US --theme  Smartwave/porto -f &&
chown -R muser:mgroup ../ &&
../bin/magento cache:flush &&
service varnish restart

However after that when I inspect the source code on the page where the widget is inserted the target="_blank" is still missing.

Is there something in the deployment that I forget?

I am on Magento 2.3.4 and the active theme is Smartwave/porto

  • if you are in development mode and full page cache is disabled you do not need to do anything. You should see the template change as soon as you save the template. Turn on template hints so you can be 100% sure you are editing the right file.
    – paj
    Commented Feb 1, 2020 at 18:14
  • yes that's what I did and the hints show me that I edit the correct file. Totally lost haha Commented Feb 2, 2020 at 3:20

1 Answer 1


OPCache was enabled and caching the data.

service php7.3-fpm restart

And everything is good :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.