• every document in my theme is either .php or .css! where is the actual html file? i need to insert a line of code generated by MyBlogLog between “<body>” and “</body>”.

    p.s. i’m using the BLIX theme.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Edit index.php: there should be no .html, your .php files replace the need.

    There’s no html in wordpress because of its dynamic-content nature.

    For most theme, <body> will be located in header.php, </body> will be located in footer.php, or both tags could be in index.php

    As far as I know, you can pretty much insert html anywhere in a PHP document, and it will be accepted. It’s a matter of where you want it to appear. Say you want to add an html img src code to every post. You’d go to the index.php, look for the post content listing and throw the html in there. If you want to do the same in the sidebar, go to the sidebar php and stick it where you want the image to show up. However, you never want to break up the php code. That’s bad. Stay from outside of the <—-> sections, and you should be okay. As a coding idiot, what I did when I first started learning placement was to save the file that works as goodheader.php (or goodsidebar.php, etc) in your files, then mess around with placement in the existing file, and keep seeing how it looks. Worst case scenario, you can always change the name good—.php back to the original name and nothing’s changed. But that’s just my two cents. For an example, look at my site: monkeypup.org. In the sidebar, I have images in place of category headers. What I did was put an image tag in the sidebar.php in place of the category header. So…does any of what I said make sense? If not, there are far more intelligent and capable people here to help. Might also help to know where on your page you want the html code to appear…
    Good luck!

    Thread Starter mollyo

    (@mollyo)

    THANK YOU!!

    after 3 years of learning Blogger, i’m having a hard time wrapping my head around WordPress.

    i appreciate the answers and fast feedback!

    molly o’

    Thread Starter mollyo

    (@mollyo)

    just curious: would you also put a favicon and additional title bar text coding in Header.php also? or is there a better place for it?

    well, you should only put a favicon in the root folder of your site. In your case, mollopoverty.com. So, create a favicon, pop open your ftp program, and upload the favicon to the root folder.

    Not sure what you mean by title bar text.

    title bar text, the text between <title> and </title> should be put between <head> and </head> (which can be found in header.php)

    Wow, I’m way late in making this submission, but below you can see where I inserted the mybloglog script in the index.php file. My theme calls it the “Main Index Template”. Unfortunately, the mybloglog site’s information for helping wordpress bloggers is not helpful at all. Try this. It works perfectly for me and was confirmed by the mybloglog tech guy that I had put the code in the right place. Just lucky since I’m not a coder!

    <?php
    get_header();
    ?>
    <script type=’text/javascript’ src=’https://track.mybloglog.com/js/jsserv.php?mblID=2006061606541135′></script&gt;

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”entry”>

    julienne

    (@julienne)

    I tried that,

    I have this script I want to use:

    <script language=”JavaScript”><!–
    if (self != top) {
    if (document.images)
    top.location.replace(window.location.href);
    else
    top.location.href = window.location.href;
    }
    //–></script>

    But it takes me to any posts with an image…ahahaahaha when I go to manage to edit a post.
    Thanks

    There is now a Mybloglog plugin for wordpress..makes inserting their code very easy:

    Here’s the link:
    https://www.abyssknight.com/?p=42

    Instead of adding the whole code Mybloglog gives you just put in the numbers after ‘ID’…they call it your MBLID.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘adding a line of MyBlogLog.com (stats) code… where?’ is closed to new replies.