Welcome! To use this support forum, please Login or Join Today!

   

adsense instead of an ad in header

{name}
Rank

Total Posts: 1

Joined 2014-05-29

PM

 

Hi I want to replace the header ad with adsense code. I have been looking for what I need to replace in the header.php file to make the adsense type code work in the header, and can’t seem to get it right, please help. Also, will a 728x90 ad look right in the header on this theme?

Yeah, it’s expertspages.com, and Im wanting to use it for multisite.

So while we are here, I am also using solvemedia to monetize comments and avoid spammers, so where would I put the code for that, inside the code for comments on multisite. You can see an example of that issue on:
http://demo.expertspages.com/2014/06/07/hello-world/
under the comment box. Can’t I put a define thing in the config.php for those keys it is asking for?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

If you’ll edit themes/onyx/header.php,

find:

<div id="headerad">
 <a href="<?php echo (get_option('sthemes_header_ad_url'));?>"><img src="<?php echo (get_option('sthemes_header_ad_img'));?>" alt="ad"/></a>
</div>

and change to:

<div id="headerad">
 YOUR ADSENSE CODE
</div>

Also, will a 728x90 ad look right in the header on this theme?

Yes, however you’ll need to find #headerad in style1.css, style2.css, etc. and edit:

#headerad {
   position: relative;
   top: -120px;
   left: 480px;
   width: 468px;
   height: 60px;
}

Just change the width and height styles to reflect your changes.


Regarding your plugin question, I haven’t used solvemedia. I would think they’d have documentation available for that. If they are asking you to modify the theme, just point me to that documentation item and I can point you in the right direction.

{name}
Rank

Total Posts: 1

Joined 2014-05-29

PM

 

Thank you Casey! It worked like a charm… u r awesome!
As far as switching over to the 728 ad, would I have to do anything with the top and left settings? I am not very familiar with css.

As far as the documentation, here is the link I have for it:
https://portal.solvemedia.com/portal/help/pub/implement

If it is possible to also put that on the post creation pages too, it would really help keep the quality of posts in check. Speaking of post creation, isn’t this theme capable of posting from the front end, instead of from the wordpress dahboard?

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

As far as switching over to the 728 ad, would I have to do anything with the top and left settings? I am not very familiar with css.

The top and left settings are the distance from the top and left edges. If the newly sized ad doesn’t fit quite right, I’d say yes; adjust these settings to your desired position.

As for the documentation, they appear to have a WordPress plugin:
https://portal.solvemedia.com/portal/help/pub/wp/

Have you installed this and in the plugin settings, entered your API keys and enabled comment integration?