WPadvancedads – background ads

Posted in: Newspaper
Post count: 16

Hi

I’m trying to use this above plugin with the Newspaper theme. However, it’s background skin ad isn’t working as expected (I need more advanced functionality than the theme offers for this). They recommend the following:

It is a common issue that the theme is configured in a way that it either covers or overrides the background ads or prevents them from being clicked.

In all cases, you or your theme developer should still be able to see that the body element has a background-image style attribute.

You or your theme developer can either find the element in the theme and adjust it to not cover the background anymore. Or you can move the background to another element using the code below in the functions.php file of your theme.

add_filter( ‘advanced-ads-pro-background-selector’, ‘my_custom_background_selector’ ); function my_custom_background_selector() {
// replace ‘.main-container’ with the class or id used in your theme
return ‘.main-container’;
}
Note: replace .main-container with the overlaying element.

Would you be able to advise as to what the overlaying element is?

Also, how can I specify the body content width for the website?

Many thanks!

Post count: 21065

Hello @kevrose!

A shortcode can be inserted by using the element called “Column text” or “Text with title”. “Column text” and “text with title” elements have a button called “edit content” and if you click on that button, the WP Editor will open, and you can add some text/code/shortcode there. Close the WP Editor from X, save the changes from Composer and view the page to see the changes.
Also, try use the Raw HTML element from Composer, add the code there. It should work well and style it via CSS.

I hope that helps you!

Thank you!

Post count: 16

Hi Bettina

Thanks for your reply, although unfortunately it doesn’t answer my questions. I’ll try and phrase them better!

1. With this test site I have added a background ad with the plugin. However, you can see that only the elements to the sides of the header are showing and then this disappear on scroll. What is the element in the theme that is covering the sides? I can then adapt the code for functions.php (as above) to stop this from happening.

2. I would like to adjust the width of the content, to fit the background ad design. How do I do this in CSS or within the child theme files?

I hope I’ve explained better…

Thanks.

Post count: 21065

Hello @kevrose!

I think you have a white background on the rows. We have some settings for the rows and different stretch sizes: https://app.screencast.com/IgVmc5sB7MefE
Also, we have a feature in the theme that can be used without a plugin: https://forum.tagdiv.com/background-ads/
You should set the content width on every row of your page.

Thank you!

Post count: 16

Hi, thanks for your help. I’ve changed the content width now, and have also decided not to use that plugin, but to use your built-in ad slots.

My client’s ads need to be delivered by Google Ad Manager, so I normally put the tags in header.php. However, I have to use Multisite for this project, so have put the header code in Analytics/JS Code->HEADER SCRIPT CODE, which works for most of the ads, but not for the background skin ad. I’ve added the tags for this in AFTER BODY SCRIPT CODE but nothing is displaying. Any thoughts why this isn’t working? (It’s the same site as linked in previous post).

Many thanks.

Post count: 21065

Hello @kevrose!

Strange! It should work. It could be an issue with the ad code; please check. You can try to use the raw HTML element from Composer and add the code there.

I hope that helps you!

Thank you!

Post count: 16

Hi Bettina, thanks. How can I ensure the raw HTML runs before anything else on the page?

Post count: 21065

Hello @kevrose!

I’m not sure you can do that. Maybe with a custom solution.

Thank you!

Post count: 16

Hi

The ad code is showing up in the inspector but I still can’t see the background (skin) ad. Is there a way of deprioritising the theme’s background’s z-index? I’m not sure how to prioritise the z-index of the ad code, that’s all.

Thanks.

Post count: 21065

Hello @kevrose!

Access the raw HTML element, go to the CSS tab, and there you can find an option to set a Z-index. Write a big value there.

Thank you!

Post count: 16

Hi,

I’ve come back to using your theme and with WP Advanced Ads. It’s all working fine apart from one issue – the link on the background ad does not work. Their documentation says:

It is a common issue that the theme is configured in a way that it either covers or overrides the background ads or prevents them from being clicked.

In all cases, you or your theme developer should still be able to see that the body element has a background-image style attribute.

You or your theme developer can either find the element in the theme and adjust it to not cover the background anymore.

Can you please advise as to what body element would have a ‘background-image style attribute’ in Newspaper? I can send you a link to the site but it is currently password protected on the front-end so would need a private way of sending you the details.

Regards

Kevin

Post count: 21065

Hello Kevin!

You can send additional info privately via our email address contact@tagdiv.com.
Include a link with this topic and the wp-admin access.

Thank you!

Post count: 16

Thanks, I have emailed you.

Kevin

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