Add a Link from my Header's menus

Hi,

I would like that each one of my text slider’s maintitle links to a page.
For example the second slide-item will link me to:

The Customer Journey page

Example:

.slides-container .slide-item:nth-of-type(2) .text-slider .maintitle{
  href: "link";
}

Thank you,

Fares

Hello Fares,

To achieve such that objective, please follow the steps below:

  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($) { 

  var slideLink1 = '<a href="http://yoursite.com/services"></a>';
  var slideLink2 = '<a href="http://yoursite.com/team"></a>';
  var slideLink3 = '<a href="http://yoursite.com/about"></a>';
  var slideLink4 = '<a href="http://yoursite.com/contact"></a>';
  var slideLink5 = '<a href="http://yoursite.com/projects"></a>';

  if($('.slide-item:nth-of-type(1) .maintitle').length){
    $('.slide-item:nth-of-type(1) .maintitle').wrapInner(slideLink1);
  }

  if($('.slide-item:nth-of-type(2) .maintitle').length){
    $('.slide-item:nth-of-type(2) .maintitle').wrapInner(slideLink2);
  }

  if($('.slide-item:nth-of-type(3) .maintitle').length){
    $('.slide-item:nth-of-type(3) .maintitle').wrapInner(slideLink3);
  }    

  if($('.slide-item:nth-of-type(4) .maintitle').length){
    $('.slide-item:nth-of-type(4) .maintitle').wrapInner(slideLink4);
  }    

  if($('.slide-item:nth-of-type(5) .maintitle').length){
    $('.slide-item:nth-of-type(5) .maintitle').wrapInner(slideLink5);
  }

})(jQuery);

  1. Update

To maintain the slide title color white, add this CSS code into your site’s additional CSS option under Appearance > Customize > Additional CSS.


.maintitle a {
  color: #fff;
}

Regards,
Kharis

Thank you, that worked.

Wow you threw me back to the first language I learned hehe.

Have a good day Kharis,

Fares