- Posts: 80
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- How to remove just the Authors Link on a Category Page...
How to remove just the Authors Link on a Category Page...
- Chris Hogan
- Topic Author
- Offline
- Premium Member
Less
More
5 years 4 months ago #172571
by Chris Hogan
How to remove just the Authors Link on a Category Page... was created by Chris Hogan
Hi there,
As I have no authors (officially) setup I have no need for the Authors Names to be linkable...but I do still want them to be shown!
As far as I know the only options in the 'main parameters' and in the 'display settings' of my categories there is no option to remove this link to an authors name.
Hope this makes seen what I am trying to achieve.
Let me know if possible because at present when an Author is clicked it reverts to the homepage!
Thanks in advance
As I have no authors (officially) setup I have no need for the Authors Names to be linkable...but I do still want them to be shown!
As far as I know the only options in the 'main parameters' and in the 'display settings' of my categories there is no option to remove this link to an authors name.
Hope this makes seen what I am trying to achieve.
Let me know if possible because at present when an Author is clicked it reverts to the homepage!
Thanks in advance
Please Log in or Create an account to join the conversation.
- Chris Hogan
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 80
5 years 4 months ago #172585
by Chris Hogan
Replied by Chris Hogan on topic How to remove just the Authors Link on a Category Page...
Any thoughts...on how to achieve this?
Please Log in or Create an account to join the conversation.
- Dejan Bojovic
- Offline
- New Member
Less
More
- Posts: 17
5 years 4 months ago #172588
by Dejan Bojovic
Replied by Dejan Bojovic on topic How to remove just the Authors Link on a Category Page...
In category_item.php remove
<?php if(isset($this->item->author->link) && $this->item->author->link): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
<?php if(isset($this->item->author->link) && $this->item->author->link): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Away
- Admin
Less
More
- Posts: 6218
5 years 4 months ago #172623
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic How to remove just the Authors Link on a Category Page...
@Dejan is correct.
But out of curiosity, why would you want to remove that? It's handy to be able to list all K2 items from a certain user. The other quick tip I would add is to use the "author alias" which would output static text only (no link).
But out of curiosity, why would you want to remove that? It's handy to be able to list all K2 items from a certain user. The other quick tip I would add is to use the "author alias" which would output static text only (no link).
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Chris Hogan
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 80
5 years 4 months ago #172650
by Chris Hogan
Replied by Chris Hogan on topic How to remove just the Authors Link on a Category Page...
Hi Guys,
I removed all that code and got major errors on page, I also tried removing each line then tested various other parts...and the best I've managed to do was to make it unclickable (even though it still looks like a link!)
I did this by removing this part of the second line of code:
href="<?php echo $this->item->author->link; ?>
Any ideas how to remove the part which makes it look linkable?
Thankyou!
I removed all that code and got major errors on page, I also tried removing each line then tested various other parts...and the best I've managed to do was to make it unclickable (even though it still looks like a link!)
I did this by removing this part of the second line of code:
href="<?php echo $this->item->author->link; ?>
Any ideas how to remove the part which makes it look linkable?
Thankyou!
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Away
- Admin
Less
More
- Posts: 6218
5 years 3 months ago #172666
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic How to remove just the Authors Link on a Category Page...
You probably broke your HTML layout or PHP removing code. In order to give you the correct answer, you need to paste back your item.php code, cause if your template uses K2 overrides, the output may be slightly different from the stock K2 template files.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Chris Hogan
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 80
5 years 3 months ago #172690
by Chris Hogan
Replied by Chris Hogan on topic How to remove just the Authors Link on a Category Page...
The page is no longer broken, just need advise on removing the link from this code:
<?php if(isset($this->item->author->link) && $this->item->author->link): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
<?php if(isset($this->item->author->link) && $this->item->author->link): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Away
- Admin
Less
More
- Posts: 6218
5 years 3 months ago #172692
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic How to remove just the Authors Link on a Category Page...
Change this:
to this:
<?php if(isset($this->item->author->link) && $this->item->author->link): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
to this:
<?php if(isset($this->item->author->link) && $this->item->author->link): ?>
<?php echo $this->item->author->name; ?>
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- How to remove just the Authors Link on a Category Page...