Hi,
I have tried to insert Google Adsense code into the “templates/frontend/pages/article.tpl" file to show ads in all journal articles.
However, all articles show now a blank page.
If someone can offer me any help, the complete code is:
{**
* templates/frontend/pages/article.tpl
*
* Copyright (c) 2014-2016 Simon Fraser University Library
* Copyright (c) 2003-2016 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @brief Display the page to view an article with all of it's details.
*
* @uses $article Article This article
* @uses $issue Issue The issue this article is assigned to
* @uses $section Section The journal section this article is assigned to
* @uses $journal Journal The journal currently being viewed.
*}
{include file="frontend/components/header.tpl" pageTitleTranslated=$article->getLocalizedTitle()|escape}
<div class="page page_article">
{if $section}
{include file="frontend/components/breadcrumbs_article.tpl" currentTitle=$section->getLocalizedTitle()}
{else}
{include file="frontend/components/breadcrumbs_article.tpl" currentTitleKey="article.article"}
{/if}
{* Google Adsense *}
{literal}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-XXXXXXXXXXXX"
data-ad-slot="XXXXXXXXX"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{/literal}
{* Show article overview *}
{include file="frontend/objects/article_details.tpl"}
{* Display Dublin Core metadata *}
{include file="frontend/objects/article_dublinCore.tpl" article=$article}
{include file="frontend/objects/article_googleScholar.tpl" article=$article}
{call_hook name="Templates::Article::Footer::PageFooter"}
</div><!-- .page -->
{include file="frontend/components/footer.tpl"}