Hyperlinking Help Center Categories | Community
Skip to main content

Hyperlinking Help Center Categories

  • July 10, 2015
  • 34 replies
  • 0 views

Show first post
This topic has been closed for replies.

34 replies

  • January 25, 2018

You are awesome! That worked. The dummy article does display temporarily before redirecting to the external link. I'm not quite sure how to prevent that. I will play around with it to see if I can figure it out, but if you have any ideas that would be great.


Vladan
  • January 25, 2018

Yes, let's try to improve that. Please put this code (remove current) at the top of the head template (head, not header ;) ).

<script> 
if(window.location.href.indexOf("888888") > -1) {
 window.location.replace('https://drive.google.com');
}
</script>

and replace 888888 with your ID.

 


  • January 31, 2018

This is exactly what I wanted! Thank you!


Nicole17
  • February 1, 2018

Thanks, Vladan! 

So glad to hear this worked out for you, David. 


  • November 2, 2018

Hi Vladan. I'm using the Copenhagen theme and having the same issue as David. When you perform a search, the dummy article shows up and doesn't link to the external link like the category does. 

I tried using this code, but I wasn't sure where to put it. Could you tell me more specifically where this goes? 

<script> 
if(window.location.href.indexOf("888888") > -1) {
 window.location.replace('https://drive.google.com');
}
</script>

Vladan
  • November 2, 2018

Hi Emma, just to check, where you have placed the code above and did you change to ID from 888888 to your article ID? Any chance you can share your article url with me?


  • November 2, 2018

I haven't placed it anywhere yet because I wasn't sure where! 

This is the article URL: https://help.loseit.com/hc/en-us/articles/360011377794-Feature-Suggestions

This is the code I was thinking:

<script> 
if(window.location.href.indexOf("360011377794") > -1) {
 window.location.replace('https://www.surveymonkey.com/r/LH6KTDC');
}
</script>

 


Vladan
  • November 2, 2018

Yup, the code looks good! You just need to put it in the head template (document head). try it out and let us know how it goes! 

- edit your theme template

- open head template

- paste your code on the top of the head template.

 


  • November 2, 2018

Ahh - perfect! Thanks for your prompt assistance, Vladan!