# How to display ads in top and bottom of all pages and posts

**URL:** <https://forum.ghost.org/t/how-to-display-ads-in-top-and-bottom-of-all-pages-and-posts/54714>\
**Category:** Installation\
**Created:** [January 25, 2025, 3:33pm UTC](https://forum.ghost.org/t/how-to-display-ads-in-top-and-bottom-of-all-pages-and-posts/54714 "2025-01-25T15:33:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dx2](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@Dx2](https://forum.ghost.org/u/Dx2)\
**Post date:** [January 25, 2025, 3:33pm UTC](https://forum.ghost.org/t/how-to-display-ads-in-top-and-bottom-of-all-pages-and-posts/54714/1 "2025-01-25T15:33:49Z")

</div>

Hi. I’m using Google Ad Manager to display ads on the website. These are ads from our sponsors/advertisers. I copied the tags of one ad unit (top-centre) from Google Ad Manager and added it to the Code injection Header and Footer. The ads did display but they were in the wrong place (bottom-left). I’m using the theme source v.1.4.1. How do I make the ads display correctly without editing the theme files?  
Thank you.

---

<div class="post-metadata">

**Author:** ![vlavrynovych](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vlavrynovych/32/31432_2.png) [@vlavrynovych](https://forum.ghost.org/u/vlavrynovych)\
**Post date:** [January 25, 2025, 11:04pm UTC](https://forum.ghost.org/t/how-to-display-ads-in-top-and-bottom-of-all-pages-and-posts/54714/2 "2025-01-25T23:04:17Z")

</div>

Hi @Dx2, if without editing of the theme files, then the only option is to insert to the DOM needed Ad elements via javascript (custom code for Code Injection).

The custom javascript will need to:

- find needed places in the page
- add new Ad elements to the DOM
- init Ads (to trigger render/load)

IMHO, theme files will work better for this task as it will be simpler.

---

<div class="post-metadata">

**Author:** ![Dx2](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@Dx2](https://forum.ghost.org/u/Dx2)\
**Post date:** [February 6, 2025, 3:05pm UTC](https://forum.ghost.org/t/how-to-display-ads-in-top-and-bottom-of-all-pages-and-posts/54714/3 "2025-02-06T15:05:29Z")

</div>

Thanks @vlavrynovych
