Forum

Thread tagged as: Question, Shop

Product title

How I can get product title for example to displaying the title of a product in the HTML <title> field of the page?

Maciej Pieńczewski

Maciej Pieńczewski 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You should be able to get all the fields for a product from perch_shop_product()

https://docs.grabaperch.com/addons/shop/products/functions/perch-shop-product/

Thanks Drew, my solution

        <?php perch_shop_product(perch_get('product'), [
            'template' => 'products/title.html'
        ]); ?>