This topic has 9 replies, 2 voices, and was last updated 8 years by Radu.

  • Author
  • #137497
     hchy
    Participant

    Hello 7th Queen,

     

    I use the kleo template and have got my site layout the way I want it. I was wondering if it is possible to add just a text field, or an area right under the breadcrumbs/ title bar for google adsense. I was trying to accomplish it in visual composer but had no luck.

     

    I know google adsense codes must be inserted using a <div> tag. I know also some core wordpress files like functions.php. I was wondering if anyone can point in the right direction of what I can edit in order to just add a text field, or a block of content <google adsense code> right under the breadcrumbs/ title bar?

    I do see the ability to have an ad in the header to the far right as an option. I would love to beable to move that to under the breadcrumbs/ title bar? Thank you so much for your time

    #137499
     Radu
    Moderator

    Hi,

    use this php code, add it to wp-content/themes/kleo-child/functions.php

    COPY CODE
    function ads_before_content() {
    
        echo '
        <div style="width:728px;height:90px;background-color:red;display:block;margin:0 auto;">
        728 AD
        </div>
        ';
    
    }
    add_action ('kleo_before_content', 'ads_before_content');

    Replace

    COPY CODE
        <div style="width:728px;height:90px;background-color:red;display:block;margin:0 auto;">
        728 AD
        </div>

    With your desired code

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket solution
    #137501
     hchy
    Participant

    Thank you for such a quick response. Really appreciate it !

    #137576
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #137578
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #137581
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #137590
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #137591
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #137593
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #137597
     Radu
    Moderator

    You’re welcome

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 10 posts - 1 through 10 (of 10 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?