WordPress.org

Ready to get started?Download WordPress

Forums

Hueman
[resolved] [closed] Possible to add a google Ad in header? (29 posts)

  1. myhero
    Member
    Posted 7 months ago #

    Hi Awesome theme!

    Could you please assist / guide me in adding a 728px Google add to the right of the header?

  2. aeroomkar
    Member
    Posted 7 months ago #

    I have successfully added an ad position in header using author's reply in other thread. Here is the link for that post.

    http://wordpress.org/support/topic/ads-11?replies=6#post-4906945

    Try it, it is easy. You will have to add some css styling to make it look good

  3. aeroomkar
    Member
    Posted 7 months ago #

    Here is the result.
    http://tinypic.com/r/2h7lx6v/5

  4. myhero
    Member
    Posted 7 months ago #

    Would you be so kind as to share your code + steps?

  5. aeroomkar
    Member
    Posted 7 months ago #

    First add the following code in header.php

    <div class="ads-header-desktop">My ads here</div>

    Replace "My ads here" with your adsense or other ad tag.

    Then in custom css add the following styling,

    .ads-header-desktop {
        display: block;
        float: right;
        margin-right: 5px;
        margin-top: -95px;
    }

    You may need to change the top and right margin values to suit your website design.

    You will also need to add the following code in custom css to disable the ad from showing in smaller screens.

    /* hide or display */
    .ads-header-desktop { display: block; }
    
    @media only screen and (max-width: 800px) {
    .ads-header-desktop { display: none; }
    }
  6. myhero
    Member
    Posted 7 months ago #

    Perfect thank you!

  7. Moflistic
    Member
    Posted 6 months ago #

    This is Great. I would try this out. Are d ads banners also gonna be changing?

  8. benyazici
    Member
    Posted 6 months ago #

    Hi,
    Thanks for awesome theme,

    Can you explain me little bit more about where to insert codes? In header.php after which line should I insert it so that adds will show right next to (right of) site description?

    Thanks

  9. benyazici
    Member
    Posted 6 months ago #

    Also is there any way to take site description under site title? Instead of being next to each other, can it be under site title?

  10. myhero
    Member
    Posted 6 months ago #

    I've placed my code after the <h1 class="site-title"> in header.php.

  11. andriansah
    Member
    Posted 5 months ago #

    hi aeroomkar

    Thanks for the tips, This is what i want

  12. karenstl
    Member
    Posted 4 months ago #

    I want to do the same thing and would be over my head with creating a child theme so thought I would follow these instructions and just redo it every time there is a site update.

    When I looked in the Header.php file, I couldn't find <h1 class="site-title"> at all.

    I'm also pretty new to Adsense, and so far have just pasted code into text widgets. What do you mean by the tag (to replace your text My Ads Here)?

    Appreciate your help!

  13. andriansah
    Member
    Posted 4 months ago #

    @karenstl

    Just put the code to where you want to appear on header
    Replace text My ads here is replace that sentence with your ads code

  14. Web Guru
    Member
    Posted 4 months ago #

    @karenstl be aware every theme uses different structure ... so it never means that you can do that step for any theme and you are done .... just think for your own theme and the above said theme .... if these both are same, then these steps will work, else you have to make change according to your own theme ...? now its on you, are you using same theme?

  15. karenstl
    Member
    Posted 4 months ago #

    I am using Hueman. I don't know code so I have no clue where to place the code in the header.php file. I'm really good at pasting when someone tells me where.

    I also saw that the version I'm using is a lite version as it was downloaded fro WP.org and not from the developer's site. I tried downloading it off his site but just got a blank page. Maybe if I can sort that out then the <h1 class="site-title"> will shop up in that file.

  16. andriansah
    Member
    Posted 4 months ago #

    @karenstl

    you can put the code after line 48 on header.php

  17. Bosco Carvalho
    Member
    Posted 4 months ago #

    @aeroomkar,

    As Hueman doesn't have a 'custom.css' should I edit 'style.css'?
    If yes, where?

  18. karenstl
    Member
    Posted 4 months ago #

    You can add a plugin for CSS. The one I use is called Simple Custom CSS.

  19. karenstl
    Member
    Posted 4 months ago #

    So I got the ad to show up in my header, but clearly need some code to make it show up on the right and even with the logo, not below it. Do I need to move it up the code (<div class="ads-header-desktop">My ads here</div>) in the header.php file? Or is there CSS I need?

    Any suggestions would be appreciated.

  20. Bosco Carvalho
    Member
    Posted 4 months ago #

    @karenstl

    Did you put
    .ads-header-desktop {
    display: block;
    float: right;
    margin-right: 5px;
    margin-top: -95px;
    }
    on Custom.css as aeroomkar suggested?

    By the way: doing that the template looses it's responsiveness on smartphones.

  21. Bosco Carvalho
    Member
    Posted 3 months ago #

    Update for Hueman Version 2.1.3

    Place the ad code in Header.php just below:

    <body <?php body_class(); ?>>

    And in Custom.css, insert:

    .ads-header-desktop {
    display: block;
    float: right;
    margin-right: 20px;
    margin-top: 98px;
    }

    But know the ad is placed far off to the right.

    What could be done?

  22. achatap
    Member
    Posted 3 months ago #

    when i used code it show 502 bad gateway on all new tricks

  23. Bosco Carvalho
    Member
    Posted 3 months ago #

    Hi Achatap,

    Now your site is back online again.
    Probably some server was down when you tryed to access it.

    Has nothing to do with the banner's codes.

    Check this out: 502 Bad Gateway

  24. achatap
    Member
    Posted 3 months ago #

    yes , now it is online. but i put codes in header.php in after 48 th line and put custum css code but still ads dont show ,
    please help.
    my site is all new tricks

  25. Bosco Carvalho
    Member
    Posted 3 months ago #

    Acatap,

    Are you using Google Adsense?
    Please provide more inputs.

  26. achatap
    Member
    Posted 3 months ago #

    i use code from marimedia.net this site.

  27. achatap
    Member
    Posted 3 months ago #

    now code show in header perfecty , you can check here all new tricks @Bosco thanks

  28. wordpresshelpnow
    Member
    Posted 3 months ago #

    Hi,

    Great WordPress theme!

    In addition to the Hueman newest update theme for WordPress that I have installed, I also installed the Child Hueman Child. Right now, I will like to make changes to the main Hueman theme for the following. The current changes I made in the main Hueman theme is not permanent because each time the Hueman theme is updated, all my customization is deleted and replaced to the original Hueman theme. As a result, I will like to apply all changes for the Hueman theme by putting the script in the Hueman Child.

    Header:
    I have a logo size 400 width and 90 height on the left side of the header. I will like to display a Google Adsense ad with size 728 by 90 at the right side of the header. How do I do this?

    Left Top Group Sidebar:
    How do I make changes to the name "FOLLOW:" with the blue background? I'll like to change it to another name.

    Right Top Group Sidebar:
    How do I make changes to the name "MORE" with the green background? I'll like to change it to another name.

    Note:
    I will like to apply all the above changes for the Hueman theme by putting the script in the Hueman Child. How do I do this? What section of the main Hueman Theme script should I copy and paste in the Hueman Child Theme and modify in the Hueman Child Theme?

    Please Help.

    Thanks

  29. Andrew
    Forum Moderator
    Posted 3 months ago #

    You can create your own thread here: http://wordpress.org/support/theme/hueman#postform

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic