Maintitle as h1

Dear all,

I want change the maintitle at my slider section to h1. It is default h2. I edited the “text-slider-section” at my slider.php by editing the html heading from h2 to h1:

<div class="contain">
                            <h1 class="maintitle"><?php echo esc_html($slider_title_1); ?></h1>
                            <p class="subtitle"><?php echo esc_html($slider_subtitle_1); ?></p>

But that doesn´t work.
Is there a quick fix to that?


There is 5 maintitle within slider.php, did you change all the tag and the close tag?
I’ve just try to change it also and its working, but the font-size is not changed because the css code is addressed for the .maintitle not h1 or h2

I changed all 5 maintitle to h1, also the closing tags /h1.

The slider.php is in my child theme. Can try to change it at sydney mother theme, but then it will be overwrited by updates.

Don`t know hat is different.

It works with changes at the mother theme, so it seems like that the php data within the child theme folder doesn´t respond to the changes.

What is confusing, because all the others are working fine. Will check that behavior first.


You have to add this line:
require get_template_directory() . '-child//inc/slider.php';

to the functions.php in your child theme. But, please be carefully when adding these line. please to:

  1. activate your child theme first
  2. add code in above to your child theme
  3. open functions.php in the mother theme and change this line:
    require get_template_directory() . '/inc/slider.php';
    // require get_template_directory() . '/inc/slider.php';

Hope it helps :slight_smile:

Hi Awan,

I see. Did your changes and it works for the maintitle at my slider.php.

Will exactly do the same with:

require get_template_directory() . "/widgets/fp-services-type-a.php";
require get_template_directory() . "/widgets/fp-services-type-b.php";

For having h2 for widget titles, right?

So I add this to my functions.php in the child theme:

require get_template_directory() . '-child//widgets/fp-services-type-a.php';
require get_template_directory() . '-child//widgets/fp-services-type-b.php";

And second add this to the mother theme:

// require get_template_directory() . "/widgets/fp-services-type-a.php";
// require get_template_directory() . "/widgets/fp-services-type-b.php";

Thanks so much.


yup! I tried it first before reply your question in above. Did the trick is works for your site?

Hi Awan,

I have a question to this fix.

At my mother theme I comment out the three directories.
// require get_template_directory() . ‘/widgets/fp-services-type-a.php’;
// require get_template_directory() . ‘/widgets/fp-services-type-b.php’;
// require get_template_directory() . ‘/inc/slider.php’;

But if I do a theme update this will overwrited and be not commented out and destroy the fix then.

So it isn´t a good option, right?


Hi Stefanis,

Yes, you’re right. I didn’t see another way instead to comment those line in the mother theme.

So, every you update the theme, you have to comment those line manually.

too bad :frowning:

But thanks a lot for your help :slight_smile:

yup :slight_smile:

Please feel free to ask here if you need more help.