XF 2.2 CSS on the new post screen

MapleOne

Well-known member

Site: dn(dot)ca​


I have been trying to remove the lower google ad from my new post screen with no success.

I did manage to get this to work

Code:
/* Hide Second Google Ad in New Post Screen */
[data-template="whats_new_posts"]
{iframe#aswift_2 {display: none;}}


But that leaves a big blank spot and my footer does not shift up.


I think I have to remove this instead


Code:
/* Hide Second Google Ad in New Post Screen  */
[data-template="whats_new_posts"]
{div.#aswift_2_host {display: none;}}


However no combination of anything I do works

Here is the address: dn.ca/explore/new-posts

Any guidance here would be very much appreciated


PS. The lower google ad is in the advertisement section and loads in the lower container so it loads on every page. However when there are no new posts the two ads so close together make the page look heavy and cluttered.
 
You could either wrap the ad code in a conditional statement

Rich (BB code):
<xf:if is="$template != 'whats_new_posts'">
<YOUR_AD_CODE_HERE>
</xf:if>

OR

Alternatively to remove the ad position itself

In the template PAGE_CONTAINER search for

<xf:ad position="container_content_below" />

And wrap it in the conditional statement:

Rich (BB code):
<xf:if is="$template != 'whats_new_posts'">
<xf:ad position="container_content_below" />
</xf:if>
 
Last edited:
Back
Top Bottom