Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

Add text to Category link

Status
Not open for further replies.
Joined
Apr 19, 2010
Posts
1,446
Reaction score
13
Been searching for this and trying for the last hour and I cant seem to find a solution.

Does anyone know how I add a word to the Wordpress Category link and make them part of the clickable link:

<div class="category"><?php the_category(', ')?></div>

I know I can add words to it but those are not clickable, but how do i make them part of the link so they are clickable?

Many thanks.
 
Have you tried asking on the wordpress.org forum?
 
Thanks Pete, sorry for my limited knowledge but how do I implement this?

Have tried different versions of the code but I keep getting an error message.

Thanks again.
 
I think it probably only works within the loop. I don't really know where you are trying to put it?

This code would work for showing a link to the current category.

<a href="<?php echo get_category_link($category->cat_ID); ?>">Blah <?php echo $category->cat_name; ?></a>
 
I think it probably only works within the loop. I don't really know where you are trying to put it?

This code would work for showing a link to the current category.

<a href="<?php echo get_category_link($category->cat_ID); ?>">Blah <?php echo $category->cat_name; ?></a>

Thanks Peter, tried that but now the category just points to the homepage of the website, not to the actual category the article is posted in.

I have tried to replace the original code with the code above.
 
PM (or post here if you don't mind) the template which you want to update.
 
Thanks Peter, tried that but now the category just points to the homepage of the website, not to the actual category the article is posted in.

I have tried to replace the original code with the code above.

The way I understand it, you are trying to add a category then click it and it redirects to the proper category of your site. Have I understand it right? It should not be much of a problem.
 
Status
Not open for further replies.

Rule #1: Be Respectful

Do not insult any other member. Be polite and do business. Thank you!

Members online

Premium Members

Latest Comments

Upcoming events

New Threads

Domain Forum Friends

Lastest Listings

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom