WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Statcounter shows up in sidebar for some, in footer for others... (9 posts)

  1. warrenleon
    Member
    Posted 9 years ago #

    This is a weird one. I've got a small stat counter at the bottom of my page. It looks fine when I log in (using Firefox and Mac OS X on a 15" Powerbook), but when my wife logs in (using Safari, Mac OS X on a 12" Powerbook) the stat counter is at the bottom of the Sidebar and nothing is at the footer of the page.

    I tried logging on with Safari, and it looked fine.

    I don't know how many people are seeing the counter in the sidebar, but I'd rather no one did.

    Any ideas? My site is: http://www.screenwritinglife.com.

    Thanks, as always (and it's been often lately), for the help.
    WHL

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Your stat code isn't in the footer or the sidebar - it's just in 'body' hence it's wandering nature :)

    I would put it inside the footer div - just cut the code from where it is and paste it above the </div> above it. You may then need to put a <br /> tag before it to get the stats on a new line.

  3. warrenleon
    Member
    Posted 9 years ago #

    I see, you're right. I moved the code above the </div> above it, and it moved up, but was left justified. Can I center it easily?

    This is the code, before I moved it. Any suggestions on how it should read?

    <?php get_footer();?>
    </div>
    </div>

    <!-- Start of StatCounter Code -->
    <script type="text/javascript" language="javascript">
    var sc_project=755926;
    var sc_partition=6;
    var sc_security="4f8273f4";
    </script>
    <script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><img src="http://c7.statcounter.com/counter.php?sc_project=755926&java=0&security=4f8273f4" alt="hit counter" border="0"> </noscript>
    <!-- End of StatCounter Code -->
    </body>
    </html>

    Also, I currently have the StatCounter Code in both the index.php page and the page.php one. The Counter company said that it should be on every page, so I added it to the page.php after first installing it on index.php. Is that a problem, do you think?

    Thanks,
    WHL

  4. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Code: http://www.phpfi.com/66419

    Adding it on page may be calling it twice .... add the above, then give a link to a page ?

  5. warrenleon
    Member
    Posted 9 years ago #

    Thanks! You Rock. Seems to have done the trick.

    One thing, though. I think I noticed that the stat counter is cutting off the text in my footer that says - powered by WordPress, as well as the bottom of the border. Any idea why it's doing that?

    Thanks!

    http://www.screenwritinglife.com

  6. Mark (podz)
    Support Maven
    Posted 9 years ago #

    In #statcounter, try adding this line:
    margin-top:10px;

    See what that does ?

  7. warrenleon
    Member
    Posted 9 years ago #

    Well,

    Didn't seem to work, but I was probably putting it in the wrong spot. Did you mean to add it to the text in the style sheet, or to add it to index.php? I REALLY need to sit down and learn more about this program before I bug you guys with programming questions.

    Either way, it looks good and is centered. That's at least a start.

    Thanks!
    WHL

  8. Mark (podz)
    Support Maven
    Posted 9 years ago #

    It would be in your css

    You have this:
    #statcenter {
    text-align:center;
    }

    Change that to this:
    #statcenter {
    text-align:center;
    margin-top:10px;
    }

    that should work I think...

  9. warrenleon
    Member
    Posted 9 years ago #

    Hey,
    I think it worked - clearly moved the counter down, but didn't reveal anything, which made me realize that my theme probably didn't HAVE the wordpress language. I went to the creator's site, and saw that hers didn't have it either. Sorry for the misunderstanding, but at least the counter is ancjored now, and I learned how to lower it on the page.

    Thanks, WHL

Topic Closed

This topic has been closed to new replies.

About this Topic