• I’m finally get back into the swing of building my online magazine, Inspiration Point. I’m using a modified version of Twenty Eleven. It’s probably not much when comparing it to others.

    My first business related goal is to add AdSense to my blog @ https://www.inspiration-point.org I’m using a leaderboard style as it seems less intrusive. I’ve found the sidebar.php file; however where do I place it? I’m using the one in the main theme folder and not the child theme.

    As for ad placement, I’m guessing right below the main header image.

    I’ll save some time and ask a follow up question. As you’ll see on the menu bar, I’m planning on adding book and video reviews. How do I incorporate affiliate programs? I’m trying to earn an eventual secondary income.

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m using the one in the main theme folder and not the child theme.

    Are you aware that any changes to theme files will be lost when WP is updated? Totally not a good way to go.

    Create a child theme and then someone can help you with modifications.

    Thread Starter BarryB64

    (@barryb64)

    I already have a child theme that’s linked to the main one. ??

    Am I right in thinking I should create a sidebar.php file and place the script there??

    Where are you trying to put ads? IN the sidebar? In that case, it would go in a widget.

    I’m glad to see that you do have a child theme – so you don’t need to modify any files in the parent theme. Any changes should be made only in the child theme.

    Thread Starter BarryB64

    (@barryb64)

    I’d like to place it right under the menubar. This way visitors will see it, once and that’s it. The widgets are on the right hand side. The ad style is leaderboard.

    Thread Starter BarryB64

    (@barryb64)

    I am doing a little detective work and I found a file called “header.php” this file deals with the main header image and the menu system.

    Should I copy this over to the TwentyEleven child them and create a new header.php file and place the generated script there? It’ll likely be at the end and just before the <div id=main> section.

    EDIT – posted this before I saw your last post – RIGHT ON!

    Okay, so put a copy of the header.php file in the child theme and add this code – the top and bottom lines of code are in the header.php file – so find those and add the new code between them.

    </header><!-- #branding -->
    
    <div id="header-ad">
    PUT AD CONTENT HERE
    </div>
    
    	<div id="main">

    Then also add to your style.css file:

    #header-ad {
         width: 600px;
         height: 80px;
         margin: 10px auto;
         border: 1px solid black;
         clear: both;
    }

    Those are approximations as to the size and position – you can adjust them as to the ads and how you want it to look.

    Thread Starter BarryB64

    (@barryb64)

    Ok. I just followed your instruction and it appears to work. I have adblock on firefox, So, I jumped over to IE and it work. I’d like to move the ad over some so it looks centered over the main section.

    I’ll play with it, later.

    My next step will be to enroll in some appropriate affilliate programs. As I’m planning to do reviews, I’ll seek to place them, there?? Still, thanks for the help

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Twenty Eleven Adding AdSense??’ is closed to new replies.