Link a Category to another url
AnsweredHello,
I'm wondering if anybody can help me out with that:
I want to link category to a different url. I mean when you click over a category links you to the url figured out previously.
Thank you
-
@Claks - If you are on a plan higher than "Starter" then you should have full control the edit the HTML of your Help Center. You can easily point your category to a different URL with some custom HTML or you could do via JQuery.
-
@Claks - If you are on a plan higher than "Starter" then you should have full control the edit the HTML of your Help Center. You can easily point your category to a different URL with some custom HTML or you could do via JQuery.
-
Yes I'm able to use customization features. What code Should I use? Thank you.
-
@Clacks - Can you provide more details so that I will know how to write the code. A screenshot or a link to your Help Center will work with some details.
-
Hi @wesdrury,
I'm using The humble Squid theme. I've 3 categories created. I just want the 3th category links to another url instead the regarding category. I already have edited the predetermined image categories using a code I found at the community. Do you need more details? I cannot send you the help center url, sorry about that.
-
@Clacks - That is enough information. Be back soon with some code.
-
@Clacks - Give this a try for me - add the below line to your JS tab below the $(document).ready(function() {:
//Point Category to external link
$("ul.category-list li a:contains('My Category')").replaceWith('<a href="externallinkhere.com"> My Category</a> ');
-------Change the "My Category" to your category
-------Change the external link
-
@WesDrudry - Thanks for helping. It wasn't work.
However, I used a code which worked fine but the thing is that how can I use different tittles according with the language the user chooses? Maybe this ways is easier. Thanks again!
look at the code:
$("<li><a></a></li>")
.find("a")
.attr("href", "www.link.com") // link
.html("T-Page") // Tittle in english
.end()
.appendTo("ul.category-list"); -
@Clacks - my code worked as I tested it on my account before I posted the code however the code you posted will work as well. As for your question about the languages there are two options you have. You can add some more Jquery or you could use Dynamic Content and use placeholders in your HTML.
JQuery will be like this:
if(currentLanguage === 'Français') {
$("<li><a></a></li>")
.find("a")
.attr("href", " www.link.com") // link
.html("T-Page") // Tittle in english
.end()
.appendTo("ul.category-list");}
IF you need further help I will glad to get one my fellow moderators who specializes in multiple languages to assist you. Let me know how it goes.
-
@WesDrudry Thanks for helping. Finally, it works fine. Both codes work perfectly. The one I sent you and the one you made in case someone else needs it :)
best regards!
-
@Clacks - Thanks for the update and I'm glad you got it working. I assume you also got the multiple languages in there also.
-
Could this same functionality be applied to a section?
-
@Kristen - Yes with JQuery anything is possible and you should be able to change the code to link a section to an external URL. If you need further help just let me know.
-
Wes, that is awesome news! Yes please help! I follow a lot of your posts religiously because they have been so helpful for this newbie.
-
@Kristen - Its my pleasure to help you out and I'm glad to hear my post have been very helpful for you :-). What theme are you using and are you able to provide me a link to your Help Center
-
Humble Squid. Here's the link.
-
@Wes What I'm trying to do is link the category that is called Document Downloads to the Documents listed under the REACH University category. This way I could hide the Document Downloads category from the homepage but the end-users would be able to see the broken down sections linked under it.
-
@Kristen - I've signed up for your Help Center so hopefully I will be able to log in soon. If not can you approve support@wesdrury.zendesk.com so that I can see exactly what you are talking about.
-
How do I approve you? I didn't know I had to approve a user. That's kind of great because I want to limit who has access to it.
-
@Kristen - I don't think you have to approve but I need to verify my email address however I don't think I got sent an email in order to do that.
-
Wes could you help me as well?
I am using the
The Humble Squid template.
-
@Mike - What exactly are you needing help with as there are different solutions on these post.
-
I am trying to make it so when you click on one of my categories it will take you to an external site from my company.
-
@Mike - You can find the code here.
-
Wes the code works but the category is not missing the image can you help me with this as well?
-
@Mike - Can you provide the URL to your Help Center as my code should not have interfered with the image but it all depends on the HTML code that was used.
-
@Mike - Can you make sure that you have the code in place and which category are you trying to link.
-
It is the category titled CMS
-
@Mike - Is that category hidden as I don't see it from my end.
Please sign in to leave a comment.
50 Comments