Keyword

[SOLVED] Inserting 3rd party ad script after Author info

  • MJ MCBRIDE
  • MJ MCBRIDE's Avatar Topic Author
  • Offline
  • New Member
More
10 years 5 months ago - 10 years 5 months ago #127476 by MJ MCBRIDE
I am looking to add in a line of javascript between the author bio & latest posts at the end of a k2 article. See attachment for placement

I have placed it in the correct spot I believe /components/com_k2/templates/default/item.php
on line 425 between code here:
<?php endif; ?>
<script src="ib.3lift.com/ttj?inv_code=turfburner_article_sub">
<?php if($this->item->params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems)): ?>

But the script doesn't show up when I view source. I tried adding basic text even and it won't update. Default is the only k2 template I have in there so it can't be the wrong template directory I don't believe.

ANyone have any help they could provide? Is there a cache i need to empty? I emptied the basic joomla k2 cache, and still no luck.
Attachments:

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

More
10 years 5 months ago #127477 by Lefteris
Hi. First of all don't edit core K2 files as you will lose all your changes in future updates. You can always create overrides and add your custom code there. Details on this can be found at getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates . Now if your change is not applied, probably it's because your site is already using overrides and you need to add the code to them.

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

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

  • MJ MCBRIDE
  • MJ MCBRIDE's Avatar Topic Author
  • Offline
  • New Member
More
10 years 5 months ago #127478 by MJ MCBRIDE
Thanks there was a template in place which is why it wasn't working. I assumed the custom template would of been in the component k2 templates folder not the general joomla template.

This is resolved

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

More
10 years 5 months ago #127479 by Lefteris
You are welcome.

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