# post\_1 の後にカスタム HTML を追加する方法

**URL:** <https://meta.discourse.org/t/how-to-add-customer-html-after-post-1/123068>\
**Category:** Product Support\
**Created:** [2019 年 7 月 16 日午後 12:28 UTC](https://meta.discourse.org/t/how-to-add-customer-html-after-post-1/123068 "2019-07-16T12:28:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![DigitalStartup](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/digitalstartup/32/118242_2.png) [@DigitalStartup](https://meta.discourse.org/u/DigitalStartup)\
**Post date:** [2019 年 7 月 16 日午後 12:28 UTC](https://meta.discourse.org/t/how-to-add-customer-html-after-post-1/123068/1 "2019-07-16T12:28:00Z")

</div>

投稿内に顧客用バナー（アフィリエイト目的）を追加したいと考えています。 **具体的には** 、`<article id="post_1..."` の直後に、この（例示の）HTML ブロックを追加したいのです。

```plaintext
<div id="custom-ad">
    <a href="example.com">
        <img src="https://picsum.photos/id/74/750/90">
    </a>
</div>

```

つまり、以下のような形になります。

 ![bannerexample](https://global.discourse-cdn.com/meta/original/3X/2/5/259c1ac4bea96c453cff08f2b5a79362e1367b66.png)

CSS の `:after` では限られた成果しか得られませんでした。そこで、[この例](https://meta.discourse.org/t/extending-the-about-page/110866/5?u=digitalstartup) のような `<script>` を `</HEAD>` 内で使用して、この処理を実行できるか疑問に思っています。

**編集** : さらに少し試行錯誤した結果、`<div class="topic-map">` の末尾にバナーを挿入する方がより適切だと考えられます。

```plaintext
<div class="topic-map">
    <section class="map map-collapsed">...</section>
    ここにカスタム HTML
</div>

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-customer-html-after-post-1/123068)._
