-
AuthorPosts
-
September 7, 2014 at 3:56 am #314664
I would like to place a google adsense banner to the right of the logo in the header.
Tried everything. How do you do this.
ThanksSeptember 8, 2014 at 1:34 pm #315027Hi remodelit!
Please refer to #2 here – https://kriesi.at/support/topic/reduce-space-between-new-blog-posts-in-widget-and-more/#post-309876
Regards,
YigitSeptember 8, 2014 at 9:37 pm #315356I was able to place a line of text but the google adsense script did not work. So close – get parse error. Is it because it is asking for text?
Parse error: syntax error, unexpected ‘Ad’ (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /home/huss6881/public_html/homerenovations.ca/wp-content/themes/enfold/includes/helper-main-menu.php on line 103
September 9, 2014 at 1:45 am #315476Hi!
Can you paste the code you are trying to use?
Regards,
JosueSeptember 9, 2014 at 6:23 pm #316034Here it is. Many thanks for taking a look.
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– HR Ad –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:728px;height:90px”
data-ad-client=”ca-pub-6717158804949902″
data-ad-slot=”1236364606″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>September 10, 2014 at 6:18 am #316303Hi!
Thank you for the info.
Please add this at the very bottom of functions.php:
function add_adsense_script(){ ?> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!– HR Ad –> <div class="header-right"> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-6717158804949902" data-ad-slot="1236364606"></ins> </div> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <?php } add_action('ava_main_header', 'add_adsense_script');
Use this on Quick CSS or custom.css to adjust the position of the adsense container:
.header-right { position: absolute; right: 20%; top: -30px; }
Best regards,
IsmaelSeptember 10, 2014 at 2:38 pm #316609Now the site crashed and I cannot fix it. Can you please help? I added the code at the end of the function.php file.Now I get:
Parse error: syntax error, unexpected ‘?’ in /home/huss6881/public_html/homerenovations.ca/wp-content/themes/enfold/functions.php on line 501
Line 501 was where I added the code.
Thanks
September 10, 2014 at 3:36 pm #316666Hi,
Can you please create me an temporary FTP account? post it here as a private reply.
Regards,
JosueSeptember 10, 2014 at 4:23 pm #316715This reply has been marked as private.September 10, 2014 at 4:54 pm #316740This reply has been marked as private.September 10, 2014 at 10:38 pm #316975This reply has been marked as private.September 10, 2014 at 11:09 pm #316992September 13, 2014 at 7:54 pm #318583This reply has been marked as private.September 13, 2014 at 8:24 pm #318587Hey!
I’d suggest disabling it on mobile devices
@media only screen and (max-width: 767px) { .header-right { display: none; } }
Best regards,
JosueSeptember 13, 2014 at 10:26 pm #318637Where would I put that?
ThanksSeptember 13, 2014 at 11:03 pm #318657Hi,
In Quick CSS.
Best regards,
JosueSeptember 14, 2014 at 1:54 am #318689You guys are top shelf support.
September 14, 2014 at 2:16 am #318693Thanks for the kind words :)
September 16, 2014 at 9:11 pm #320136One last issue? The adsense ad is great but you can’t click on it to go to the link?
ThanksSeptember 17, 2014 at 1:45 am #320217Hi,
Can you post the link to your website please?
Regards,
JosueSeptember 17, 2014 at 2:48 pm #320513This reply has been marked as private.September 17, 2014 at 8:13 pm #320701Hi!
Add this:
.header-right { z-index: 100; }
Best regards,
JosueSeptember 17, 2014 at 9:06 pm #320730Sweet. I really appreciate your support! I’m closing this off.
-
AuthorPosts
- The topic ‘Adsense Banner Right of Logo’ is closed to new replies.