• I have asked similar questions from this board yesterday but didn’t receive any reply. Perhaps, I didn’t explain my self clearly. I have been trying add some addcodes into my sidebars. I did change my sidebar.php file inserted the code. However, I am experiencing very unusual problem. My first post stretches and gets extra white space at the bottom every time I insert a code into my sidebars. In other words, the rest of my posts get shifted downwars if I add codes into my sidebar. Please help me to resolve it? Thank you very much

Viewing 15 replies - 1 through 15 (of 26 total)
  • Sounds like an unclosed tag of some kind, maybe a div. Take a look for that.

    Thread Starter soyola

    (@soyola)

    I don’t think there was any unclosed tags. Let me share with you a short script for one of my side bars. Where would you place the ad because I tried every possible place without any success.

    <!– begin sidebar –>
    <div id=”left-menu”>

      <?php wp_list_pages(); ?>

      <li id=”categories”><?php _e(‘Categories:’); ?>

      <?php wp_list_cats(); ?>

    <li id=”archives”><?php _e(‘Archives:’); ?>

      <?php wp_get_archives(‘type=monthly’); ?>

    </div>
    <!– end sidebar –>

    <!-- begin sidebar -->
    <div id="left-menu">
    <li id="adcode1">insert adcode call/script here</li>
    <?php wp_list_pages(); ?>
    <li id="categories"><?php _e('Categories:'); ?>
    <?php wp_list_cats(); ?>
    <li id="archives"><?php _e('Archives:'); ?>
    <?php wp_get_archives('type=monthly'); ?>
    <li id="adcode2">or possibly insert adcode call/script here</li>
    </div>
    <!-- end sidebar -->

    Look through your code calls, and the js or other script itself, to make sure you don’t have any div tags in any of it – that’s one thing that might screw the pooch.

    Oh, one other thing: once you get the code displaying right in the sidebar, you may need to go back and surround it with CDATA tags in order to get it to validate.

    Thread Starter soyola

    (@soyola)

    Thank you very much for your help. Just two more question because I am sure there are newbies out there who are struggling with same issues.

    1. What if I insert ads from different advertiser like Adbrite or Bidvertiser? How do we change that php code?

    2. What is CDATA tags? How do we get it validated?

    Thank you very much

    You can use the same sort of <li> tagset around however many pieces of ad code you want to load into your sidebar. You simply give each of them a unique id (in case you need to do something specific in the style.css file for a certain ad, for instance).

    CDATA tags are sometimes (though not always) required in order for validation to XHTML 1.0. IF (and only if!) you have a problem validating your page, post back one of your code snippets (with the identifiable info removed of course) and I’ll repost with the CDATA tags.

    Thread Starter soyola

    (@soyola)

    Thank you for your help. Have a Happy New Year !

    You as well, and if you have further issues, post back; we’ll try to get it sorted.

    Thread Starter soyola

    (@soyola)

    Guess what ? It was too early for me to get excited. It worked for IE but Firefox is still displaying it wrong. Do you know why?

    Nope. Can’t help you with that one, I don’t use IE at all. Sorry. Just keep tweaking, and check back here every once in a while – maybe someone with some IE interest will have an answer eventually.

    Thread Starter soyola

    (@soyola)

    No what I meant was. It looks ok in IE but still have the same problem in Firefox

    Okay, post back your blog addy, and I’ll take a look tomorrow….

    Thread Starter soyola

    (@soyola)

    Ok Here you go. Just like what you said:

    <!– begin sidebar –>
    <div id=”left-menu”>

      <?php wp_list_pages(); ?>
      <li id=”categories”><?php _e(‘Categories:’); ?>
      <?php wp_list_cats(); ?>

    <li id=”archives”><?php _e(‘Archives:’); ?>

      <?php wp_get_archives(‘type=monthly’); ?>

    <li id=”adcode1″> <!– Begin BidVertiser code –>
    <SCRIPT LANGUAGE=”JavaScript1.1″ SRC=”http://bdv.bidvertiser.com/BidVertiser.dbm?pid=8795&bid=39096″></SCRIPT&gt;
    <noscript>affiliate program marketing</noscript>
    <!– End BidVertiser code –>

    </div>
    <!– end sidebar –>

    What I really need is the web address of your blog, so I can look at it online.

    Thread Starter soyola

    (@soyola)

    I apologize. Here it is

    http://www.theblogtribune.com

    Bookmarked, and I will check it out in the morning. While it’s not really late here, I got less than 2 hours sleep last night (70+mph winds etc.) – it’s not a good thing to try to troubleshoot this sort of thing in a fog….

    I’ll post once I’ve had a chance to look it over.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘How to properly add adcodes into my sidebars?’ is closed to new replies.