I would like to use two (2) fonts on my Header Slider First Slide Title

I would like to have

Welcome to <div style=“font-family: ‘Parisienne’, cursive; font-size:26px;display:inline;”>Wish Upon A Dove</div>

on my slider page. Above css gives

Welcome to <div>Wish Upon A Dove</div>

Help please
Thank you
Dave Stucky

Hello Dave,

Thank you for reaching out to us here.

It can be achieved by doing the following 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

jQuery(function($) {
 
  var newTitle = 'Welcome to <span style="font-family: 'Parisienne', cursive; font-size:26px;display:inline;">Wish Upon A Dove</span>';
  
  $( '.slide-item:nth-of-type(1) .maintitle' ).html(newTitle);
  
});

  1. Update

Regards,
Kharis

OK that worked like a champ. But then stopped working. Not sure why. deleted the js and redid it still doesn’t work.

Dave
:frowning:

Hello there,

Please share the link to your site, so I can inspect it.

Regards,
Kharis

http://wishuponadove.com/improved/

I have changed the title to Wish Upon A Dove

Thanks
Dave

Hello there,

Thank you for updating me. I found a bug on your code.

Please replace this line:


$('.slide-item:nth-of-type(1).maintitle').html(newTitle);

with:


$('.slide-item:nth-of-type(1) .maintitle').html(newTitle);

Regards,
Kharis

Unfortunately no joy. I deleted the script and retried to no avail. Next step?

Thank you

Dave

Hello there,

Sorry for the code update doesn’t work for you.

Please replace this code:


jQuery(function($) {
 
  var newTitle = '<span style="font-family: 'Parisienne', cursive; font-size:84px;display:inline;">Wish Upon A Dove</span>';
  
  $( '.slide-item:nth-of-type(1) .maintitle' ).html(newTitle);
  
});

with:


jQuery(function($) {

  var fontFamily = 'Parisienne';
  var newTitle = '<span style="font-family: '+fontFamily+', cursive; font-size:84px;display:inline;">Wish Upon A Dove</span>';
  
  $( '.slide-item:nth-of-type(1) .maintitle' ).html(newTitle);
  
});

Let me know how it goes. I’ll wait to hear back from you regarding your stats.

Regards,
Kharis

Kharis THANK YOU! It worked. Persistence pays off. Thank you again.

Dave

My pleasure!

I am glad they are all working for you at this time! Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

If you don’t mind, could you please rate our Sydney theme here:https://wordpress.org/support/view/theme-reviews/sydney#postform like some of our users did? We would highly appreciate it if you do so.

Regards,
Kharis