Title on two lines

Hi is tit possible to put the title of the home page in two line with different sizes:

smaller size: “Benvenuti nel sito del”

bigger size: “Centro della Cardiomiopatia Ipertrofica”

Hello there,

Please try doing the below steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
    (function($){

      if( $('.header-slider .maintitle').length ) {
        var title1 = 'Benvenuti nel sito del';
        var title2 = 'Centro della Cardiomiopatia Ipertrofica'
        $('.header-slider .maintitle').html('<span class="title1">'+title1+'</span><span class="title2">'+title2+'</span>');
      }

    })(jQuery);
  1. Update
  2. Add this CSS code to Appearance > Customize > Additional CSS from dashboard.
    .header-slider .maintitle span {
      display: block;
    }

    .header-slider .maintitle span.title1 {
      font-size: 18px;
    }

Regards,
Kharis

Hi

What about the English home page?

Thanks

Hello there,

Use this code:

    (function($){

      if( $('.header-slider .maintitle').length ) {

        var title1 = 'Benvenuti nel sito del';
        var title2 = 'Centro della Cardiomiopatia Ipertrofica';

        var lang = $('html').attr('lang');

        if( lang == 'en-US' ) {
          title1 = 'EN: Benvenuti nel sito del';
          title2 = 'EN: Centro della Cardiomiopatia Ipertrofica';
        }

        $('.header-slider .maintitle').html('<span class="title1">'+title1+'</span><span class="title2">'+title2+'</span>');

      }

    })(jQuery);

Your English slide’s title goes to the below lines:

    title1 = 'EN: Benvenuti nel sito del';
    title2 = 'EN: Centro della Cardiomiopatia Ipertrofica';

Regards,
Kharis

Hi+
it is not working
pS I used if( lang == ‘en_GB’ )

please help thanks

Try en-GB instead of en_GB, which exactly matches with lang attribute of HTML tag.

46

You can get it with web browser’s inspector tool.

Regards,
Kharis

great!
now it works

thanks a lot

gianni

You’re welcome Gianni!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis

Thanks
Your support has been fantastic

Gianni