Archived topic
ads show
7 replies · Started by Mahipal on March 20, 2022
hello sir,
I am placing google ad on my website but i see only one ad in this ad post
Hi Mahipal,
I tried accessing the website you linked but it says “This site can’t be reached”.
In any case, GeneratePress shouldn’t be preventing Ads from showing. Can you try #1 here and see how it goes?: https://docs.generatepress.com/article/debugging-tips/
Also try reaching out to your Hosting Provider and see if they have a setting for your website which is blocking your ads.
Hope this helps. :)
MY Website https://history.takliya.com/ this site is live please check again.
Thank you, I can see the website now.
May we know how you’re adding your ads specifically?
Hope to here from you soon. :)
Sir, I had given advertisements at night but due to low visibility of advertisements I removed the advertisements. I tried to activate all WordPress plugins but the problem persists.
Or you tell me how can I place manual ads.
I see. You can try adding the script of your advertisment through a hook Element.
Here is an article you may refer to with regards to this: https://docs.generatepress.com/article/hooks-element-overview/
For instance:
<div class="my-advert">
<!-- your ad script here -->
</div>
Hope this helps! Feel free to reach out if you’ll need further assistance with regards to this. :)
I want ads inside the article
I see. If that’s the case, here is an article you may refer to for reference with regards to the location of some specific hooks: https://docs.generatepress.com/article/hooks-visual-guide/
Through these hooks, you’ll be able to place your ads in your preferred locations in different pages/posts.
If you want to place it somewhere more specific, you may also create your own shortcode which create a new custom hook:
Portable hook code:
function your_shortcode($atts, $content = null) {
ob_start();
do_action('hook_name');
return ob_get_clean();
}
add_shortcode('portable_hook', 'your_shortcode');
After adding this PHP, you may add the shortcode as such: https://share.getcloudapp.com/mXuY7knN
Then you can now hook to hook_name through custom hook.
Example: https://share.getcloudapp.com/eDu5xKLX
Moreover, you may also use WordPress core HTML Blocks to place your ad’s script: https://www.youtube.com/watch?v=3QTlQWi18t0
Hope this clarifies. :)