I try to retrieve one custom attributes for a product and print in title.phtml. I have followed all the steps for create a custom attribute and add it to a group correctly and it appears in admin panel and I can insert my custom value. The problem comes when I try to retrieve the new custom attribute using
$_product = $this->getProduct();
$sample = $_product->getCustomAttribute('sample');
If I print the var_dump of $_product the custom attribute is missing. Thanks