Google Matched content widget

Posted in: Newspaper
Post count: 623

It’s a bit difficult to put Google matched content with a Newspaper theme.

One can use a text widget in the sidebar to put Google matched content this works well.
Also to put it after article you can add matched contents as related posts using following code:

<div class="wpb_raw_code wpb_content_element wpb_raw_html">
<div class="wpb_wrapper">

//YOUR MATCHED CONTENT CODE

</div>
</div>

Refer: http://prntscr.com/ej10ni

Result:
On desktop : http://prntscr.com/ej11rb
On Mobile: http://prntscr.com/ej128a

BUT

After activating td-speed-booster plugin the google matched contents get to mess with the design.
See results:
Below content – http://prntscr.com/esot2u
In sidebar – http://prntscr.com/esotu2

Disabling speed booster plugin fixes the issue.

But it compromises the pagespeed
Page speed with Speedbooster plugin – http://prntscr.com/esov91

Need a solution for this.

Post count: 20688

Hi,

Matched content ads were never officially tested with our theme so there is no official implementation method. I have no solution at the moment for this, we would have to make tests for compatibility and see why this is happening in conjunction with the Speedbooster plugin. If this will be implemented in a future update it will be fully supported and every aspect shall be taken into account. Maybe you can find a cause and solution and post the results here.

Thank you for understanding!

Post count: 623

Hi, @simion

Problem solved by adding conditional CSS for the code.
Now it’s working as expected with speedbooster plugin.

Post count: 436

Hi Amit,

What’s you find code to make it work?

Thank you.

Post count: 22

Need help too

Post count: 28

Hi Amit. Can you let me know about the css you mention to get this working ok?

Post count: 623

Hi @mike_ashworth
You can use the above mentioned code to display Google matched contents ads below each single post. You only need advanced css stuff if you’re using td speed booster plugin.

Post count: 28

Thanks Amit. Will that piece of code you’ve posted above replace the existing “related articles” section below each post or do i somehow need to turn that particular feature of before using the code you posted?

Post count: 623

Welcome.

Adding that code will display matched content ads below the single post just above the related posts. You can either disable related posts from theme panel or use both.

Post count: 28

Cheers Amit, you;re a star!

Post count: 1

You are awesome!!! saved my day…

Post count: 623

@mike_ashworth and @jobijjang

My pleasure.
Cheers!

Post count: 52

What is the advanced CSS code to make it display correctly?

Post count: 2

A bit easy you can do it by use Ad Injection plugin

Post count: 623

@external
CSS needs only when you are using speed booster plugin.

Post count: 51

I tried this code:

<div class=”wpb_raw_code wpb_content_element wpb_raw_html”>
<div class=”wpb_wrapper”>

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<ins class=”adsbygoogle”
style=”display:block”
data-ad-format=”fluid”
data-ad-layout-key=”-ib-v+n-3y+c7″
data-ad-client=”ca-pub-8390561613148257″
data-ad-slot=”5523310379″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
</div>

i create adsense code with InFeed option. I Put this code in sidebar with html widget and also in ADS—article bottom ad … nothing appear.

what am I doing wrong?

Post count: 623

@axehorde

To show InFeed ads in the sidebar, you don’t need to modify adsense code, just put the code you get from your AdSense dashboard in HTML widget. That’s it. Same for the Matched Content ads.

The above-mentioned code is required only if you wanna add Matched content ads in the template.

For example, if you wanna show matched content ads below the post content then you need to edit loop-single.php file (Refer screenshot: https://prnt.sc/ljqqwq)
Result:
http://prntscr.com/ljqrg1

Post count: 26

I already inserted the code and it works well for the desktop version, but for the mobile version it does not work. I have activated the TagDiv AMP and the Mobile Theme.
Should I modify something else?
Thank you

Post count: 623

@edtrejo

You have to repeat same procedure for the mobile theme.
For mobile theme edit /mobile/single.php file to add matched content ads.

That matched content ads do not work on AMP.

Post count: 26

@Amit
Done!
Thank you so much.
Regards

Post count: 18

Hi there

can you please add this option in your in next theme update.

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