Display two adsense units in the same custom ad

Posted in: Newspaper
Post count: 23

Hi,
It’s possible to display two adsense ads in the same custom ad block?
I have:
<script async src=”http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script&gt;
<!– novo adapt –>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-client=”ca-pub-publishernumber”
data-ad-slot=”adslotnumber”
data-ad-format=”auto”></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

I’ve tried to input another one (different ad size, different slot) but it doens’t display.
Even tried using Div but nothing again.
Anyway to use this?
Thanks.

Post count: 22421

Hello,
I’m not sure what you mean, you can only have 1 ad inside an ad box in the theme panel. If you want the add to display twice on your website you will have to use another ad box to display it. You need to have 2 distinct elements for it. For example you will have to use 2 ad box elements on pages and set them to the desired ad spot or use this method for posts: https://forum.tagdiv.com/custom-ad-spots/
I hope this helps.
Thank you!

Post count: 23

Hello

I need to know how i can put 2 ads in the same custom ad in my theme panel, like that:

http://www.ela-e-ele.com/tu-nao-sabes-o-que-perdeste-mas-eu-sei-o-que-ganhei/

tanks

Post count: 22421

Hello,
Unfortunately the theme does not have such an option. You can only insert one ad in one spot. Maybe you can achieve this by using a plugin like adrotate for example.
Thank you!

Post count: 23

ok. Another question

I would like to know if I can put a link on the “credits” on my posts, without the name of the original post. Only “Credits” as a link…
I would like to remove the name of the site…

Best

Irina

Post count: 22421

Hello Irina,
Please provide more details to your request so we can better understand how to help. Provide a link to your website and maybe a screenshot of what you mean.
Thank you!

Post count: 23

Hello

this is my website:

What i mean?
After the article, when you see the link “Marlene Barreto Frazão” disappear and this link go to inside “fonte/credits”.

Its possible the word “fonte/credits” to be a link?

Tank you

Post count: 23

After the article, when you see the link “Marlene Barreto Frazão” , I don’t wanna the name of the site… Only the word “FONTE” with the link inside it. I don’t wanna show the name “Marlene Barreto Frazão”, for example.

Post count: 22421

Hello,

This type of modification will require a bit of altering of the theme files to pull it off. There is no option for it so we will have to hard-code it.
You will have to access td_module_single_base.php and edit these lines:
http://screencast.com/t/oJMOmRJVbU39
Simply replace them with these 2 lines (do not replace anything else just the 2 lines highlighted)

$buffy .= '<div class="td-post-small-box"><span>' . __td('<a rel="nofollow" href="' . esc_url($via_url) . '">' . 'VIA' . '</a>', TD_THEME_NAME) . '</span></div>';
and
$buffy .= '<div class="td-post-small-box"><span>' . __td('<a rel="nofollow" href="' . esc_url($source_url) . '">' . 'Source' . '</a>', TD_THEME_NAME) . '</span></div>';

As a result the source and via will become links: http://screencast.com/t/OxRf4Q9TnBx

Thank you!

  • This reply was modified 10 years by Bogdan B..
Post count: 23

Hi Bogdan,
Thanks for your answer.

I followed your instructions (Newspaper / includes / wp_booster) but didn’t got the expected result.
I changed the two lines (https://www.dropbox.com/s/ozteke7qs2udh2a/editor.png?dl=0) but it didn’t get right as your exemple (https://www.dropbox.com/s/luyma47ect1gf76/screen.jpg?dl=0).

It’s a CSS related issue or it’s more than that?

Thanks.

Post count: 22421

Hello,
Sorry for that, there was a css part to the customization but it seems I forgot to provide it.
Please use this css to fix it:
.td-post-small-box span{
background-color: rgba(34, 34, 34, 0);
}
Thank you!

Post count: 23

Thanks.

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.