Question

I've spent a few hours now trying to find this here on Magento StackOverflow. By default in the RWD theme, the Details tab below the short product description is hidden and in an <h2> tag.

The hidden part is in the CSS and I don't mind it being hidden, but I do mind it being an <h2>. As SEO teaches us, a layout/design item shouldn't be a heading of any kind.

Now I searched my behind off to find the item both in the template files or the css, but I cannot find where it gets <h2> appointed and how to change it to <span> like all the other tabs in that space.

Product page: https://www.medicinalewietolie.com/cbd-olie-raw-5-naturel-10ml-medihemp.html

Code snippet here: https://imgur.com/a/BaT3bQB

Était-ce utile?

La solution

That <h2> tag is coming from app/code/design/frontend/base/default/template/catalog/product/view/description.phtml

The contents of that file have the following in there

<?php $_description = $this->getProduct()->getDescription(); ?>
<?php if ($_description): ?>
    <h2><?php echo $this->__('Details') ?></h2>
    <div class="std">
        <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>
    </div>
<?php endif; ?>

In order to change that <h2> to a <span> you'll need to copy that file into app/code/design/frontend/rwd/default/template/catalog/product/view/description.phtml and change the <h2> to a <span>

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top