Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello there,

    Ideally you’ll use a BR (<br />) tag to break the text line. However there’s no way to do that as HTML tag isn’t allowed for security reason. Fortunately you can use jQuery approach to manipulate the default output. Please try doing these 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').length ) {
    
        $('.header-slider .slide-item').each(function(n){
    
          var pos = n+1; 
          
          if( pos == 1 ) {
          
            var subtitle2 = 'My second subtitle line goes here';
            
            var subtitle  = $(this).find('.subtitle').html();
            $(this).find('.subtitle').html(subtitle + '<br/>' + subtitle2);
          }
            
        });
    
      }
      
    })(jQuery);  
    

    Supply your second line text in the subtitle2 variable.

    4. Update

    Regards,
    Kharis

    Thread Starter MooK

    (@kubelyan)

    hi @kharisblank

    I try to follow the steps, but there is no second subtitle line appeared on the Subtitle for the first slides section….

    Where did you copy the code from? Email or direct reply in the forum thread?

    Please share your site link, so I can have a look.

    Regards,
    Kharis

    Thread Starter MooK

    (@kubelyan)

    hi

    I copied it from the thread.

    I am testing it on here.

    Thread Starter MooK

    (@kubelyan)

    I forgot to mention:
    I choose < Stop the text slider? > option. But I’ve seen second line when I ucheck that box. But I want to add second subtitle with static text slider.

    Hello there,

    Please try to replace the code I suggested with this one:

    
    ;(function($) {
    
      if( $('.header-slider').length ) {
    
        var subtitle  = $('.text-slider .subtitle').html();
        var subtitle2 = 'My second subtitle line goes here';
            
        $('.text-slider .subtitle').html(subtitle + '<br/>' + subtitle2);
    
      }
      
    })(jQuery);
    

    Regards,
    Kharis

    Thread Starter MooK

    (@kubelyan)

    Hi @kharisblank.

    Thanks you very much for this code. It works great ??
    may I ask you if it’s possible to add the hyperlink to the second subtitle as well?

    thanks

    You can insert a link in this line:

    
    var subtitle2 = 'My second subtitle line goes here';
    

    So it’ll look like this:

    
    var subtitle2 = 'My second subtitle line goes here <a href="#">Your text link</a>';   
    

    Regards,
    Kharis

    Thread Starter MooK

    (@kubelyan)

    Thank you very very much !!!!! ??

    You’re welcome!

    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

    Thread Starter MooK

    (@kubelyan)

    hi Kharis Sulistiyono (@kharisblank)

    By the chance are you supporting Ignis theme as well?

    Yes, I am.

    Roman, a colleague of mine, already replied you. Please be patience.

    Regards,
    Kharis

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Second Subtitle line for the first slide’ is closed to new replies.