Keyword

How to remove just the Authors Link on a Category Page...

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
4 months 3 weeks ago #172571 by Chris Hogan
Chris Hogan created the topic: How to remove just the Authors Link on a Category Page...
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
Attachments:

Please Log in or Create an account to join the conversation.

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
4 months 2 weeks ago #172585 by Chris Hogan
Chris Hogan replied the 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.

More
4 months 2 weeks ago #172588 by Dejan Bojovic
Dejan Bojovic replied the 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>

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
4 months 2 weeks ago #172623 by Fotis
Fotis replied the 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).

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
4 months 2 weeks ago #172650 by Chris Hogan
Chris Hogan replied the 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!

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
4 months 1 week ago #172666 by Fotis
Fotis replied the 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.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • Chris Hogan
  • Chris Hogan's Avatar Topic Author
  • Offline
  • Premium Member
More
4 months 1 week ago #172690 by Chris Hogan
Chris Hogan replied the 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>

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
4 months 1 week ago #172692 by Fotis
Fotis replied the topic: How to remove just the Authors Link on a Category Page...
Change 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; ?>

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum