Buy Sell Discuss UK Domain Names at AcornDomains.co.uk

Today's Drop Dates are: 19-02-2012 or 26-02-2012   All times are GMT. The time now is 03:17:21 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Content Management Systems > Wordpress
Connect with Facebook

Wordpress Wordpress Blogs

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 03-10-2011, 11:41:15 PM     #1 (permalink)

 
ProDomains's Avatar
 
Join Date: Apr 2010
Posts: 916
ProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond repute

Add text to Category link

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.
ProDomains is offline  
Old 04-10-2011, 04:52:18 AM     #2 (permalink)

 
bensd's Avatar
 
Join Date: Jan 2007
Location: Wiltshire, UK
Posts: 4,148
bensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond reputebensd has a reputation beyond repute

Have you tried asking on the wordpress.org forum?
bensd is online now  
Old 04-10-2011, 07:39:24 AM     #3 (permalink)

 
peter_w's Avatar
 
Join Date: Nov 2008
Location: Leeds, UK
Posts: 470
peter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond repute

http://codex.wordpress.org/Function_..._category_link

The example is a bit clumsy on here, but it should give you what you need. You will need to echo the current category name alongside your words where they have simply put 'Category Name'.
__________________
You'll find me on LinkedIn, Twitter and Google+.
peter_w is offline  
Old 04-10-2011, 09:16:13 AM     #4 (permalink)

 
ProDomains's Avatar
 
Join Date: Apr 2010
Posts: 916
ProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond repute

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.
ProDomains is offline  
Old 04-10-2011, 09:33:55 AM     #5 (permalink)

 
peter_w's Avatar
 
Join Date: Nov 2008
Location: Leeds, UK
Posts: 470
peter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond repute

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>
__________________
You'll find me on LinkedIn, Twitter and Google+.
peter_w is offline  
Old 04-10-2011, 09:49:30 AM     #6 (permalink)

 
ProDomains's Avatar
 
Join Date: Apr 2010
Posts: 916
ProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond reputeProDomains has a reputation beyond repute

Quote:
Originally Posted by peter_w View Post
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.
ProDomains is offline  
Old 04-10-2011, 09:59:48 AM     #7 (permalink)

 
peter_w's Avatar
 
Join Date: Nov 2008
Location: Leeds, UK
Posts: 470
peter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond reputepeter_w has a reputation beyond repute

PM (or post here if you don't mind) the template which you want to update.
__________________
You'll find me on LinkedIn, Twitter and Google+.
peter_w is offline  
Old 11-10-2011, 06:03:17 AM     #8 (permalink)
Member
 
Join Date: Oct 2011
Posts: 64
daleduan is infamous around these partsdaleduan is infamous around these partsdaleduan is infamous around these parts

Quote:
Originally Posted by ProDomains View Post
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.
daleduan is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
Higher end link exchanges Frog Services Wanted 1 28-01-2011 03:39:13 PM
Some cheap link building opportunities... Frog Services Wanted 0 09-01-2011 03:16:51 PM
Just launched - link exchange site for people interested in content based links marka Search Engine Optimisation 13 23-04-2009 10:59:39 PM
Text link prices jimbo1 General Board 1 16-01-2008 02:14:10 PM
Changing the text of tradeDoubler links eetc Affiliate Marketing 5 07-07-2005 10:39:36 PM

Domain Sponsor 2


All times are GMT. The time now is 03:17:21 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".