Link header text to a page

I have some header text in my functions.php file. I would like to have some of that text link to a page, namely the text that says “Case Evaluation Form.” What is the code to achieve this?

Hi There,

Could you please provide us with your custom code so we can take a closer look?

Thank you.

// Additional Functions
// =============================================================================

// Add phone and text next to the logo
// =============================================================================
function add_logo_text_number(){ ?>
  
  <div class="custom-text right pas">
     <span class="text">Free Consultation | No Recovery, No Fee </span><br>
     <a class="call-button" href="tel:(###) ###-####" style="outline: none; ">Call</a> <span class="text">or </span> <a class="text-button" href="sms: (###) ###-####" style="outline: none;">Text</a><span class="text">(###) aaa-aaaa </span><br>
     <span class="text">Fill out the Case Evaluation Form for Fastest Service</span>
  </span></div>

<?php }
add_action('x_after_view_global__brand', 'add_logo_text_number');
// =============================================================================

Hi There,

Please update your code to this:

// Add phone and text next to the logo
// =============================================================================
function add_logo_text_number(){ ?>
  
  <div class="custom-text right pas">
     <span class="text">Free Consultation | No Recovery, No Fee </span><br>
     <a class="call-button" href="tel:(###) ###-####" style="outline: none; ">Call</a> <span class="text">or </span> <a class="text-button" href="sms: (###) ###-####" style="outline: none;">Text</a><span class="text">(###) aaa-aaaa </span><br>
     <span class="text">Fill out the <a href="http://www.yourwebsite.com/link">Case Evaluation Form</a> for Fastest Service</span>
  </span></div>

<?php }
add_action('x_after_view_global__brand', 'add_logo_text_number');
// =============================================================================

Let us know how it goes!

Thanks. That worked well. One more question though. Is it possible to put the “Case Evaluation Form” with hyperlink into a box like the “text” and “call” boxes? Currently the “Case Evaluation Form” doesn’t look right because my link color (blue) is very similar to the background of the header.

Hi there,

You may add the text-button to the Case Evaluation link like:

<a class class="text-button" href="http://www.yourwebsite.com/link">Case Evaluation Form</a>

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.