Keyword

Remove or edit author link from articles

  • Andreas
  • Andreas's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62401 by Andreas
Hello, i have the same issues which another user states here: community.getk2.org/forum/topics/remove-author-link

I want to remove the link from the author's name or if possible i want to change that link with the website that author used to his K2 profile.

Unfortunately the solution he finds seems that it doesn't work on this version of K2, can you help me with that?

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

  • Andreas
  • Andreas's Avatar Topic Author
  • Offline
  • New Member
More
12 years 7 months ago #62402 by Andreas
Replied by Andreas on topic Re: Remove or edit author link from articles
do i ask too much? anyone that can help me with that?

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

More
12 years 3 weeks ago #62403 by Naro Jr
Replied by Naro Jr on topic Re: Remove or edit author link from articles
Hi Hope I can still help...

For K2 v2.5.7 You've got to hack the item.php file located at root/components/com_k2/templates/default/index.php

On line 73 replace

<a rel="author" href=:<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>

wtith

<a rel="author" href="#"><?php echo $this->item->author->name; ?></a>

save the file, reload the page on your browser, and whalah!

"This is my first contribution, I'm happy to be able to give back!"

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

More
12 years 3 weeks ago #62404 by Lefteris
Replied by Lefteris on topic Re: Remove or edit author link from articles
@Naro Jr

Thanks for your commitment. Just wanted to tell that you do not need to hack the file. You can make a template override for this, since it's a layout file. You can get information on K2 templating and overrides at getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
10 years 3 months ago #62405 by vanessa
Replied by vanessa on topic Re: Remove or edit author link from articles
Is this process of the template override still valid? This post was almost two years ago and I wanted to make doing this was correct.

thank you

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 3 months ago #62406 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Remove or edit author link from articles
The lines might not be correct but the overall procedure is correct.
Furthermore I would completely remove the link.

The resulting code should look like this:
<?php echo $this->item->author->name; ?>

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum