• Resolved poojaindia

    (@poojaindia)


    Hi there,
    I wish to add an ad unit after six posts. I have gone through this thread and other mentioned threads in this regard.
    I am using Hueman theme version provided on Alex’s site and not wp provided.
    I have edited index.php as mentioned on pastebin I wish to do this by calling function dynamic_sidebar(‘adsense’);
    I have created a sidebar named adsense in theme options->sidebar. I added the adsense unit in the widgets section.

    However, the ad unit is not appearing after six posts. In my opinion, I am struck as described at 7th post (MayurJango) this thread
    Do I need to change something in css. Reputed forum member, bdbrown had suggested adding css for text-4 widget. However, I am using sidebar method and not using widget plugin.

    Please suggest a solution for this problem,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi poojaindia. You mentioned creating a sidebar named “adsense” and using that in your code. Is “adsense” also the sidebar id? The unique sidebar id is the name you would use in your dynamic-sidebar code.
    The css float style to display the “text-4” widget was based on the widget name created at runtime. An easier way to do it is to include the dynamic sidebar in a <div> container with a class, something like this:

    <?php
      echo '<div class="my-ad-sidebar">';
      dynamic_sidebar('sidebar-id');
      echo '</div>';
    ?>

    Replace ‘sidebar-id’ with the id of your sidebar. Then the css would look like this:

    .my-ad-sidebar {
      float:left;
    }

    Let me know if you have any questions.

    Thread Starter poojaindia

    (@poojaindia)

    Thank you bdbrown. It was really helpful. Thanks again for sharing such great knowledge of yours. I request other users, who would be reading this query later for solutions to go through the link I mentioned in the first post. Then the solution would be clear. The problem has been resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ad Unit issue on homepage. Have read old threads’ is closed to new replies.