Skip to content

How to change the h3 heading of the Joomla modules title?

Go to yoursite.com/templates/system/html/modules.php and correct the desired heading.

You should find this lines:

/*
* xhtml (divs and font headder tags)
*/
function modChrome_xhtml($module, &$params, &$attribs)
{
if (!empty ($module->content)) : ?>
<div>
<?php if ($module->showtitle != 0) : ?>
<h3><?php echo $module->title; ?></h3>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
<?php endif;
}

and change them to this:

/*
* xhtml (divs and font headder tags)
*/
function modChrome_xhtml($module, &$params, &$attribs)
{
if (!empty ($module->content)) : ?>
<div>
<?php if ($module->showtitle != 0) : ?>
<h2><?php echo $module->title; ?></h2>
<?php endif; ?>
<?php echo $module->content; ?>
</div>
<?php endif;
}

Published inCodingJoomla

4 Comments

  1. Référencement Strasbourg Alsace

    Hi, thx for the tips. I’d like to know if these changes will stay with joomla’s updates, or not ?

  2. tumisho

    Hi thnx for the article

    can u please show how to do these changes for 1 module only…. not for all modules

    thank you in advance

Comments are closed.