mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2025-03-10 06:39:57 -04:00
Fix ads to display only once at top of article, mainly for index
This commit is contained in:
parent
5ef7a21d76
commit
1a9ca28b1c
@ -16,6 +16,33 @@
|
|||||||
</header>
|
</header>
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
|
{% unless ad1_displayed %}
|
||||||
|
{% assign ad1_displayed = true %}
|
||||||
|
{% if site.google_bannerad_slot %}
|
||||||
|
<script type="text/javascript"><!--
|
||||||
|
google_ad_client = "{{site.google_ad_client}}";
|
||||||
|
google_ad_slot = "{{site.google_bannerad_slot}}";
|
||||||
|
google_ad_width = {{site.google_bannerad_width}};
|
||||||
|
google_ad_height = {{site.google_bannerad_height}};
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript"
|
||||||
|
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||||
|
</script>
|
||||||
|
{% endif %}
|
||||||
|
{% endunless %}
|
||||||
|
|
||||||
|
{% if index %}
|
||||||
|
<div class="entry-content">{{ content | excerpt }}</div>
|
||||||
|
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
|
||||||
|
{% if excerpted == 'true' %}
|
||||||
|
<footer>
|
||||||
|
<a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
|
||||||
|
</footer>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<div class="entry-content">{{ content }}</div>
|
||||||
|
|
||||||
{% if site.google_bannerad_slot %}
|
{% if site.google_bannerad_slot %}
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
google_ad_client = "{{site.google_ad_client}}";
|
google_ad_client = "{{site.google_ad_client}}";
|
||||||
@ -29,14 +56,4 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if index %}
|
|
||||||
<div class="entry-content">{{ content | excerpt }}</div>
|
|
||||||
{% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
|
|
||||||
{% if excerpted == 'true' %}
|
|
||||||
<footer>
|
|
||||||
<a rel="full-article" href="{{ root_url }}{{ post.url }}">{{ site.excerpt_link }}</a>
|
|
||||||
</footer>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
<div class="entry-content">{{ content }}</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user