Site logo

Archived topic

Separate containers before the end of the article.

5 replies · Started by Kevin on December 5, 2018

Viewing posts 1–6 of 6

I wanted separate containers in the articles before arriving in the comments, I wanted to separate the containers in the time that arrives in the related articles, but I can not and I have no idea what to do.

My site is skdesu.com, open an article and see what I'm trying to explain. I used Google translator, maybe it's confusing.

Related articles are being placed through Ads ADS, I get to put some CSS in it. I do not know what or what to do to separate the container in that place, I tried to copy </ article> but it did not work.

Hi there,

how have you added the ADS related posts to your post?

Adsense Google code, but I forgot to also use the jetpack. So the correct thing is to create a new container from the jetpack.

So have you found a solution?

I have no idea how to do this.

So, Adsense provides you with some HTML / Code to add to your posts.
We can hook this into post template like so:

1. Go to Appearance > GeneratePress and make sure you have the Elements Module activated.
2. Appearance > Elements > Add New > Hook
3. Add this markup to the Hook with your adsense code within:

<div class="grid-container adsense-related-posts">
    Add your script here
</div>

4. Then in the hooks field. Select 'before comments container'
5. Go to the display rules tab and select Posts as your rule. Then save.

This archived topic is closed to new replies.